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
- Context.cs
- TagPrefixAttribute.cs
- Bits.cs
- DiagnosticsConfiguration.cs
- FollowerQueueCreator.cs
- DrawingState.cs
- CodeNamespaceImportCollection.cs
- ChildDocumentBlock.cs
- UrlMappingCollection.cs
- BinaryFormatter.cs
- SingleAnimationBase.cs
- KeyConstraint.cs
- RefType.cs
- ClientProtocol.cs
- HScrollBar.cs
- TimestampInformation.cs
- DecimalConstantAttribute.cs
- HandlerBase.cs
- FormViewRow.cs
- DataGridViewComboBoxCell.cs
- KnownTypesHelper.cs
- keycontainerpermission.cs
- BrowsableAttribute.cs
- IntegerValidatorAttribute.cs
- StringOutput.cs
- TabPage.cs
- RouteItem.cs
- SessionStateItemCollection.cs
- ComponentRenameEvent.cs
- DateTimeUtil.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DbConnectionInternal.cs
- PathData.cs
- X509ScopedServiceCertificateElement.cs
- KeyPressEvent.cs
- CodeTypeParameterCollection.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ProtocolsConfigurationHandler.cs
- XmlNamedNodeMap.cs
- validation.cs
- HtmlTextBoxAdapter.cs
- PageBreakRecord.cs
- ToolStripContentPanelRenderEventArgs.cs
- CryptoKeySecurity.cs
- TypeGeneratedEventArgs.cs
- ScopelessEnumAttribute.cs
- TextTreeFixupNode.cs
- DataServiceRequestOfT.cs
- RemotingException.cs
- Propagator.JoinPropagator.cs
- SingleAnimationUsingKeyFrames.cs
- WorkflowApplicationEventArgs.cs
- PolicyLevel.cs
- ErrorTableItemStyle.cs
- HttpClientCertificate.cs
- RelationshipConverter.cs
- CheckBoxList.cs
- UpdateTranslator.cs
- AmbiguousMatchException.cs
- ComponentChangingEvent.cs
- Vector.cs
- Rules.cs
- DesignerContextDescriptor.cs
- HttpApplication.cs
- WebPartEditorCancelVerb.cs
- GradientPanel.cs
- HebrewCalendar.cs
- TagPrefixCollection.cs
- HostingPreferredMapPath.cs
- mediaeventshelper.cs
- SortableBindingList.cs
- While.cs
- ComponentCommands.cs
- XmlNotation.cs
- CompositionAdorner.cs
- FixedNode.cs
- ImportContext.cs
- ChangeProcessor.cs
- TextRunTypographyProperties.cs
- OrCondition.cs
- WebBrowser.cs
- ThousandthOfEmRealDoubles.cs
- QueryCacheEntry.cs
- WebPartConnectionsConnectVerb.cs
- AttachedPropertyMethodSelector.cs
- ReferentialConstraint.cs
- shaperfactory.cs
- EncoderReplacementFallback.cs
- AsyncInvokeContext.cs
- NamedPipeTransportManager.cs
- XpsImage.cs
- SystemUnicastIPAddressInformation.cs
- TrackingMemoryStream.cs
- jithelpers.cs
- Pair.cs
- WebEventCodes.cs
- LockCookie.cs
- QueryInterceptorAttribute.cs
- XmlSchemaSimpleTypeRestriction.cs
- ToggleProviderWrapper.cs