Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ThemeDictionaryExtension.cs
- BitmapSource.cs
- ConversionHelper.cs
- TextServicesCompartmentContext.cs
- PageHandlerFactory.cs
- ApplicationSettingsBase.cs
- SafeLibraryHandle.cs
- Model3DGroup.cs
- DragDrop.cs
- IItemProperties.cs
- DesignSurfaceManager.cs
- DispatcherTimer.cs
- FilteredReadOnlyMetadataCollection.cs
- XMLDiffLoader.cs
- StickyNoteHelper.cs
- SelectingProviderEventArgs.cs
- Deflater.cs
- TextSelection.cs
- OpenTypeMethods.cs
- XmlSerializableWriter.cs
- __ConsoleStream.cs
- VirtualizingStackPanel.cs
- CompilerCollection.cs
- SecuritySessionServerSettings.cs
- RepeatButtonAutomationPeer.cs
- CapabilitiesPattern.cs
- shaperfactoryquerycacheentry.cs
- TableItemProviderWrapper.cs
- CheckBox.cs
- Comparer.cs
- RsaElement.cs
- ConstNode.cs
- Environment.cs
- GridSplitterAutomationPeer.cs
- SqlNodeTypeOperators.cs
- ProcessHostFactoryHelper.cs
- ModifiableIteratorCollection.cs
- DependencyPropertyChangedEventArgs.cs
- TabControl.cs
- ComboBox.cs
- XmlTextEncoder.cs
- WindowsScrollBar.cs
- EntitySetRetriever.cs
- MobileCategoryAttribute.cs
- ParagraphResult.cs
- ProtocolsSection.cs
- XmlSchemaAny.cs
- UpdateRecord.cs
- Serializer.cs
- RelatedView.cs
- DtdParser.cs
- RegionData.cs
- Matrix.cs
- FlowPosition.cs
- processwaithandle.cs
- SchemaDeclBase.cs
- ListenerServiceInstallComponent.cs
- arc.cs
- altserialization.cs
- XmlDataFileEditor.cs
- PolicyManager.cs
- QueryGenerator.cs
- RenderDataDrawingContext.cs
- TailCallAnalyzer.cs
- PromptEventArgs.cs
- ProtocolsConfigurationHandler.cs
- MobileControlsSection.cs
- ToolStripDropDownItem.cs
- ValuePattern.cs
- SortFieldComparer.cs
- EngineSiteSapi.cs
- coordinatorscratchpad.cs
- ObjectDataSourceDisposingEventArgs.cs
- unsafenativemethodstextservices.cs
- Selector.cs
- DatatypeImplementation.cs
- CopyNodeSetAction.cs
- BoundField.cs
- DocumentAutomationPeer.cs
- DocumentSchemaValidator.cs
- InternalDuplexChannelFactory.cs
- TrackBarRenderer.cs
- securitycriticaldataformultiplegetandset.cs
- RoleManagerSection.cs
- UInt32.cs
- SimpleMailWebEventProvider.cs
- FixUp.cs
- XmlSchemaCollection.cs
- CompilerInfo.cs
- DesignTimeTemplateParser.cs
- DataBindingCollectionEditor.cs
- Schema.cs
- SelectedDatesCollection.cs
- ScriptComponentDescriptor.cs
- AsymmetricSecurityProtocol.cs
- ComponentConverter.cs
- ObjectRef.cs
- XamlSerializationHelper.cs
- PathStreamGeometryContext.cs
- InputBindingCollection.cs