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
- XmlNavigatorFilter.cs
- MessageDecoder.cs
- Button.cs
- NamespaceCollection.cs
- TemplateAction.cs
- AccessedThroughPropertyAttribute.cs
- MatrixTransform.cs
- XmlSubtreeReader.cs
- IRCollection.cs
- COM2PictureConverter.cs
- ParsedAttributeCollection.cs
- NamedPipeHostedTransportConfiguration.cs
- ControlDesigner.cs
- TextContainerChangedEventArgs.cs
- DataGridLengthConverter.cs
- DbDataAdapter.cs
- SyntaxCheck.cs
- unitconverter.cs
- fixedPageContentExtractor.cs
- UntrustedRecipientException.cs
- SafeNativeMethods.cs
- PropertyTabChangedEvent.cs
- HttpHandlerAction.cs
- TypedTableBase.cs
- StatusCommandUI.cs
- OdbcStatementHandle.cs
- XpsPartBase.cs
- HGlobalSafeHandle.cs
- CodeGroup.cs
- baseshape.cs
- RequestCache.cs
- Property.cs
- Vector3dCollection.cs
- QueryExpr.cs
- QilCloneVisitor.cs
- SafeProcessHandle.cs
- ScaleTransform.cs
- InvalidContentTypeException.cs
- TextInfo.cs
- SqlDataAdapter.cs
- DataBindingHandlerAttribute.cs
- ConstraintCollection.cs
- NumberSubstitution.cs
- StatusBar.cs
- SvcMapFile.cs
- UnauthorizedWebPart.cs
- ClientBuildManagerCallback.cs
- TextServicesDisplayAttribute.cs
- QueryConverter.cs
- WebZone.cs
- HttpApplicationStateBase.cs
- GlyphRunDrawing.cs
- PanelStyle.cs
- AppDomainFactory.cs
- TextProperties.cs
- XmlSerializableWriter.cs
- ExtractCollection.cs
- SoapAttributes.cs
- HwndTarget.cs
- TrackingWorkflowEventArgs.cs
- SpoolingTaskBase.cs
- ResourceAttributes.cs
- coordinator.cs
- ClientSettingsStore.cs
- IPGlobalProperties.cs
- OleDbPropertySetGuid.cs
- EntityModelBuildProvider.cs
- Point3D.cs
- AttributeQuery.cs
- PagesSection.cs
- control.ime.cs
- SqlResolver.cs
- PropertyTabChangedEvent.cs
- MessageBox.cs
- InternalConfirm.cs
- RegexInterpreter.cs
- ByteAnimation.cs
- AdornerLayer.cs
- WCFBuildProvider.cs
- PtsContext.cs
- DataGridCell.cs
- ResXResourceReader.cs
- EventMappingSettings.cs
- XmlSchemaImport.cs
- CustomError.cs
- WorkflowQueuingService.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- ComAwareEventInfo.cs
- StringStorage.cs
- ItemCheckEvent.cs
- BindingManagerDataErrorEventArgs.cs
- HeaderedItemsControl.cs
- JavaScriptSerializer.cs
- FormViewInsertedEventArgs.cs
- JavaScriptObjectDeserializer.cs
- ProcessingInstructionAction.cs
- DataSourceSelectArguments.cs
- CriticalHandle.cs
- AnonymousIdentificationModule.cs
- ScrollData.cs