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, Listchildren, 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, Listchildren, 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
- PublishLicense.cs
- SmtpClient.cs
- MaterialGroup.cs
- NameSpaceExtractor.cs
- Region.cs
- CustomPopupPlacement.cs
- TypeDescriptionProvider.cs
- SessionPageStatePersister.cs
- PenThreadPool.cs
- TempFiles.cs
- LogFlushAsyncResult.cs
- UIElementIsland.cs
- XmlFormatWriterGenerator.cs
- PropertyDescriptorComparer.cs
- ListViewAutomationPeer.cs
- PopupControlService.cs
- SortKey.cs
- DesignerToolboxInfo.cs
- BaseTransportHeaders.cs
- D3DImage.cs
- MarshalByValueComponent.cs
- FileVersion.cs
- WizardPanel.cs
- CompilerGlobalScopeAttribute.cs
- DataBoundControl.cs
- TextOnlyOutput.cs
- ExtendedProperty.cs
- IdentityVerifier.cs
- DesignerVerbCollection.cs
- Operator.cs
- XmlWriterSettings.cs
- TraceContext.cs
- GifBitmapDecoder.cs
- Timeline.cs
- ConstraintEnumerator.cs
- ParsedAttributeCollection.cs
- odbcmetadatacolumnnames.cs
- TextParagraphView.cs
- StylusButtonEventArgs.cs
- DataGridDesigner.cs
- _TransmitFileOverlappedAsyncResult.cs
- ToolStripControlHost.cs
- DesignerCommandAdapter.cs
- ThemeableAttribute.cs
- PkcsMisc.cs
- ParameterCollection.cs
- QilName.cs
- TextSegment.cs
- XmlSchemaSimpleContent.cs
- BufferedOutputStream.cs
- ExecutionContext.cs
- EntityObject.cs
- ImageField.cs
- ResolveMatchesMessageCD1.cs
- HebrewCalendar.cs
- NonVisualControlAttribute.cs
- EventTrigger.cs
- RadioButtonDesigner.cs
- AdjustableArrowCap.cs
- ToolStripDropDownItemDesigner.cs
- InternalCache.cs
- Intellisense.cs
- DataGridPagingPage.cs
- OutputCacheSettings.cs
- DataSourceHelper.cs
- CorrelationManager.cs
- TypeUnloadedException.cs
- C14NUtil.cs
- ParameterToken.cs
- XsltOutput.cs
- _NegoState.cs
- ProxyWebPartManager.cs
- TemplateLookupAction.cs
- ADMembershipUser.cs
- LinqExpressionNormalizer.cs
- OleDbPropertySetGuid.cs
- DataGridTableCollection.cs
- XmlFileEditor.cs
- DetailsViewRow.cs
- ColorAnimation.cs
- BitmapEffect.cs
- ToolStripSplitStackLayout.cs
- RegexCompilationInfo.cs
- IDispatchConstantAttribute.cs
- ExtensionWindowResizeGrip.cs
- figurelengthconverter.cs
- StrongTypingException.cs
- LongCountAggregationOperator.cs
- DbSetClause.cs
- InvokeGenerator.cs
- ItemsControl.cs
- FontWeights.cs
- CompilerCollection.cs
- FrugalList.cs
- CompressedStack.cs
- CellParagraph.cs
- AttachmentService.cs
- AdornerPresentationContext.cs
- ListViewInsertionMark.cs
- DataGridTextBox.cs