Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / UnionCqlBlock.cs / 1305376 / 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
- Floater.cs
- DomNameTable.cs
- CodeDelegateCreateExpression.cs
- DrawingContextDrawingContextWalker.cs
- DesignerOptionService.cs
- TextBoxView.cs
- Color.cs
- PropertyChangeTracker.cs
- ProcessModelInfo.cs
- PipelineDeploymentState.cs
- SQlBooleanStorage.cs
- RegistryExceptionHelper.cs
- CodeDOMUtility.cs
- SiteOfOriginContainer.cs
- TextDecoration.cs
- QilStrConcat.cs
- PathFigure.cs
- StringArrayConverter.cs
- ExpressionDumper.cs
- Int32Animation.cs
- VisualTreeUtils.cs
- PageBreakRecord.cs
- CodeIterationStatement.cs
- SqlCharStream.cs
- XmlElementAttributes.cs
- BufferedStream.cs
- XmlHierarchyData.cs
- XmlSchemaSearchPattern.cs
- HtmlListAdapter.cs
- XmlSchemaInferenceException.cs
- XmlSchemas.cs
- StorageEntitySetMapping.cs
- FileRegion.cs
- XmlRootAttribute.cs
- TypeConverter.cs
- HtmlMeta.cs
- Peer.cs
- MessageSmuggler.cs
- ValueExpressions.cs
- ImageDrawing.cs
- HttpValueCollection.cs
- MetaData.cs
- ObsoleteAttribute.cs
- CodeSubDirectoriesCollection.cs
- HandlerElementCollection.cs
- EventSetterHandlerConverter.cs
- MessagePropertyFilter.cs
- Selection.cs
- SqlEnums.cs
- ColorMatrix.cs
- ValueProviderWrapper.cs
- ArithmeticLiteral.cs
- Facet.cs
- CLRBindingWorker.cs
- CommandID.cs
- SchemaTableOptionalColumn.cs
- Compiler.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- OutputCacheModule.cs
- DocumentSequenceHighlightLayer.cs
- PeerNode.cs
- ProgramPublisher.cs
- TranslateTransform3D.cs
- MessageAction.cs
- SqlInternalConnectionTds.cs
- HtmlShim.cs
- XNameConverter.cs
- SmiEventStream.cs
- CodeArrayIndexerExpression.cs
- StateMachineAction.cs
- WrappedOptions.cs
- COM2FontConverter.cs
- TextSelection.cs
- StructuralType.cs
- ContentHostHelper.cs
- CachedFontFace.cs
- ProcessStartInfo.cs
- iisPickupDirectory.cs
- ConditionalAttribute.cs
- BitmapCache.cs
- AvTraceDetails.cs
- WindowVisualStateTracker.cs
- ReferencedAssembly.cs
- XmlArrayItemAttributes.cs
- NumberAction.cs
- Registry.cs
- SqlTypeConverter.cs
- CompositeFontFamily.cs
- ImageDrawing.cs
- ListControl.cs
- ObjectTypeMapping.cs
- TreeNodeStyleCollection.cs
- EnumConverter.cs
- XPathNodeInfoAtom.cs
- ProfileInfo.cs
- AssemblyHash.cs
- UInt64Storage.cs
- TableRow.cs
- ZipArchive.cs
- BitmapPalette.cs