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
- RightsManagementInformation.cs
- ServiceNotStartedException.cs
- ConditionalExpression.cs
- RemoteWebConfigurationHost.cs
- MediaContext.cs
- OutputWindow.cs
- EmbeddedObject.cs
- SqlClientWrapperSmiStream.cs
- TypeExtensions.cs
- UIElementAutomationPeer.cs
- ProcessModelSection.cs
- MemberDomainMap.cs
- ControlDesignerState.cs
- DataGridToolTip.cs
- ClusterSafeNativeMethods.cs
- prompt.cs
- PreviewKeyDownEventArgs.cs
- Base64WriteStateInfo.cs
- ValidationEventArgs.cs
- OdbcErrorCollection.cs
- SqlRecordBuffer.cs
- Parameter.cs
- ActivatableWorkflowsQueryResult.cs
- DependentList.cs
- CallContext.cs
- tibetanshape.cs
- TextTrailingWordEllipsis.cs
- SchemaMapping.cs
- BrowserDefinition.cs
- Pen.cs
- PeerTransportElement.cs
- TimelineCollection.cs
- CodeGroup.cs
- EntitySqlQueryCacheKey.cs
- Shape.cs
- IisTraceListener.cs
- DoubleAnimationUsingKeyFrames.cs
- StrokeDescriptor.cs
- ExtendedPropertiesHandler.cs
- _FtpDataStream.cs
- MetadataPropertyAttribute.cs
- Table.cs
- XmlKeywords.cs
- Part.cs
- EventProviderWriter.cs
- WmpBitmapEncoder.cs
- PreviewPageInfo.cs
- SiteMap.cs
- CollectionChangeEventArgs.cs
- EntityProviderFactory.cs
- SequentialOutput.cs
- Color.cs
- TickBar.cs
- WebBrowsableAttribute.cs
- HybridDictionary.cs
- SynchronizedChannelCollection.cs
- DllHostInitializer.cs
- DocumentGridContextMenu.cs
- ToolStripContainerActionList.cs
- LinqDataSourceEditData.cs
- XmlNavigatorFilter.cs
- ShapingEngine.cs
- EntryWrittenEventArgs.cs
- TableLayoutPanelCellPosition.cs
- FacetDescription.cs
- EntityDataSourceUtil.cs
- ACL.cs
- EntityWrapperFactory.cs
- TypeGenericEnumerableViewSchema.cs
- DataGridViewCellStyleConverter.cs
- WebPartDisplayMode.cs
- Exceptions.cs
- HttpCookie.cs
- SplitContainer.cs
- RootProfilePropertySettingsCollection.cs
- InkCanvasInnerCanvas.cs
- WindowsEditBoxRange.cs
- CreateBookmarkScope.cs
- MouseActionValueSerializer.cs
- indexingfiltermarshaler.cs
- CodeAttachEventStatement.cs
- UserMapPath.cs
- AccessText.cs
- dsa.cs
- SequentialActivityDesigner.cs
- RankException.cs
- LostFocusEventManager.cs
- ThreadStateException.cs
- InternalPermissions.cs
- DoubleAnimationUsingPath.cs
- ListControlConvertEventArgs.cs
- HttpCacheVaryByContentEncodings.cs
- TiffBitmapDecoder.cs
- SystemWebExtensionsSectionGroup.cs
- XmlWrappingReader.cs
- FirstMatchCodeGroup.cs
- StrokeNodeEnumerator.cs
- XPathItem.cs
- DynamicObjectAccessor.cs
- SplitterPanel.cs