Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / UnionCqlBlock.cs / 1 / UnionCqlBlock.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Collections.Generic;
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.CqlGeneration {
// This class corresponds to Union nodes in the tree
internal class UnionCqlBlock : CqlBlock {
#region Constructor
// effects: Creates a union CqlBlock with SELECT (slotinfos), FROM
// (children), WHERE (true), AS (blockAliasNum)
internal UnionCqlBlock(SlotInfo[] slotInfos, List children, CqlIdentifiers identifiers, int blockAliasNum) :
base(slotInfos, children, BoolExpression.True, identifiers, blockAliasNum) {
}
#endregion
#region Methods
// effects: See CqlBlock.AsCql
internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) {
// Simply get the Cql versions of the children and add the union
// operator between them
bool isFirst = true;
foreach (CqlBlock child in Children) {
if (false == isFirst) {
StringUtil.IndentNewLine(builder, indentLevel + 1);
builder.Append(OpCellTreeNode.OpToCql(CellTreeOpType.Union));
}
isFirst = false;
builder.Append(" (");
child.AsCql(builder, isTopLevel, indentLevel + 1);
builder.Append(')');
}
return builder;
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Collections.Generic;
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.CqlGeneration {
// This class corresponds to Union nodes in the tree
internal class UnionCqlBlock : CqlBlock {
#region Constructor
// effects: Creates a union CqlBlock with SELECT (slotinfos), FROM
// (children), WHERE (true), AS (blockAliasNum)
internal UnionCqlBlock(SlotInfo[] slotInfos, List children, CqlIdentifiers identifiers, int blockAliasNum) :
base(slotInfos, children, BoolExpression.True, identifiers, blockAliasNum) {
}
#endregion
#region Methods
// effects: See CqlBlock.AsCql
internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) {
// Simply get the Cql versions of the children and add the union
// operator between them
bool isFirst = true;
foreach (CqlBlock child in Children) {
if (false == isFirst) {
StringUtil.IndentNewLine(builder, indentLevel + 1);
builder.Append(OpCellTreeNode.OpToCql(CellTreeOpType.Union));
}
isFirst = false;
builder.Append(" (");
child.AsCql(builder, isTopLevel, indentLevel + 1);
builder.Append(')');
}
return builder;
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BasicViewGenerator.cs
- RefExpr.cs
- CustomErrorCollection.cs
- MetadataPropertyAttribute.cs
- URLIdentityPermission.cs
- ConvertBinder.cs
- objectquery_tresulttype.cs
- VisualCollection.cs
- TextOptionsInternal.cs
- ExpressionVisitorHelpers.cs
- ValidatedControlConverter.cs
- InputLangChangeRequestEvent.cs
- PageAsyncTaskManager.cs
- DataGridItemEventArgs.cs
- CfgParser.cs
- DetailsViewDeletedEventArgs.cs
- ObjectToModelValueConverter.cs
- XmlElementAttribute.cs
- AnimationClockResource.cs
- CryptoApi.cs
- SqlInternalConnectionSmi.cs
- Animatable.cs
- WebPartUserCapability.cs
- CssStyleCollection.cs
- NamespaceList.cs
- ItemMap.cs
- SystemFonts.cs
- TraversalRequest.cs
- SimpleLine.cs
- EditorZoneBase.cs
- XsltLibrary.cs
- BaseUriWithWildcard.cs
- FormClosedEvent.cs
- NullableLongAverageAggregationOperator.cs
- SqlCachedBuffer.cs
- CreateBookmarkScope.cs
- EventProxy.cs
- CodeCompileUnit.cs
- CellConstantDomain.cs
- CacheMemory.cs
- RootCodeDomSerializer.cs
- HtmlTableCell.cs
- TypedTableGenerator.cs
- UIInitializationException.cs
- IList.cs
- ApplicationSettingsBase.cs
- DeploymentSectionCache.cs
- CapabilitiesPattern.cs
- PasswordRecoveryAutoFormat.cs
- RenderContext.cs
- DbBuffer.cs
- DeploymentSection.cs
- ConfigPathUtility.cs
- AuthorizationSection.cs
- StringUtil.cs
- ByteRangeDownloader.cs
- EntityProviderServices.cs
- BoolLiteral.cs
- UserControlCodeDomTreeGenerator.cs
- Journal.cs
- MSG.cs
- ChtmlTextWriter.cs
- SignatureDescription.cs
- MenuItemStyleCollectionEditor.cs
- Vector3DCollection.cs
- AssemblyInfo.cs
- InputGestureCollection.cs
- XmlSchemaComplexContentExtension.cs
- ModelFactory.cs
- PrimitiveType.cs
- HyperLink.cs
- TdsParserHelperClasses.cs
- SemanticResultKey.cs
- ProfileManager.cs
- ErrorTableItemStyle.cs
- SoapWriter.cs
- TypeElement.cs
- PropertyIDSet.cs
- rsa.cs
- CaseStatementSlot.cs
- Screen.cs
- ToolStripDropDownClosingEventArgs.cs
- FaultHandlingFilter.cs
- ListBox.cs
- ProgressBar.cs
- DataGridTextBox.cs
- ProxyWebPartManager.cs
- CompositeControl.cs
- ZipFileInfo.cs
- DataGridTextBoxColumn.cs
- TypeConverterAttribute.cs
- StylusPoint.cs
- Inflater.cs
- BufferedMessageWriter.cs
- ArrayElementGridEntry.cs
- SystemGatewayIPAddressInformation.cs
- DataControlExtensions.cs
- View.cs
- Line.cs
- IImplicitResourceProvider.cs