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
- VirtualDirectoryMapping.cs
- TripleDESCryptoServiceProvider.cs
- UrlAuthFailedErrorFormatter.cs
- GiveFeedbackEventArgs.cs
- BStrWrapper.cs
- WebBrowserHelper.cs
- ServiceBusyException.cs
- HashAlgorithm.cs
- DataGridViewImageColumn.cs
- BasicBrowserDialog.designer.cs
- OleDbConnectionInternal.cs
- MembershipPasswordException.cs
- AccessViolationException.cs
- XmlDictionaryWriter.cs
- TextDocumentView.cs
- AffineTransform3D.cs
- WindowsScrollBar.cs
- FixedTextView.cs
- XmlSigningNodeWriter.cs
- MediaElementAutomationPeer.cs
- FileChangeNotifier.cs
- EventLogEntry.cs
- XhtmlBasicLabelAdapter.cs
- XslTransform.cs
- AttributeCallbackBuilder.cs
- XmlMemberMapping.cs
- ButtonBaseAutomationPeer.cs
- WebPartVerb.cs
- TimeSpanMinutesConverter.cs
- util.cs
- FormsAuthenticationCredentials.cs
- safemediahandle.cs
- ScriptingJsonSerializationSection.cs
- KeysConverter.cs
- ArgumentValue.cs
- SerializationTrace.cs
- MachineKeySection.cs
- SplineKeyFrames.cs
- DataGridComponentEditor.cs
- ProcessModelInfo.cs
- DesignerForm.cs
- TypedRowHandler.cs
- TagPrefixInfo.cs
- BaseCodeDomTreeGenerator.cs
- PropertyRef.cs
- ByeMessage11.cs
- RestHandler.cs
- _LocalDataStoreMgr.cs
- QilGeneratorEnv.cs
- ArrayList.cs
- safesecurityhelperavalon.cs
- MsmqTransportSecurityElement.cs
- WebPartCloseVerb.cs
- TemplateKeyConverter.cs
- SoapHeaders.cs
- Highlights.cs
- ErrorFormatterPage.cs
- ToolStripDropTargetManager.cs
- AutoGeneratedFieldProperties.cs
- ISessionStateStore.cs
- ColorMap.cs
- OpenTypeCommon.cs
- AppSettingsExpressionBuilder.cs
- Graphics.cs
- SoundPlayer.cs
- Point3D.cs
- ObjectParameterCollection.cs
- _SslState.cs
- Panel.cs
- ResourceDescriptionAttribute.cs
- OdbcError.cs
- PeerContact.cs
- SafeHandles.cs
- HttpConfigurationSystem.cs
- QueryStringParameter.cs
- GeometryDrawing.cs
- AppSecurityManager.cs
- SevenBitStream.cs
- TreeWalkHelper.cs
- EmptyStringExpandableObjectConverter.cs
- NetworkInformationException.cs
- SqlTypesSchemaImporter.cs
- CompensationHandlingFilter.cs
- ExpressionList.cs
- NetworkInterface.cs
- PropertyValueChangedEvent.cs
- EventPrivateKey.cs
- LinkLabel.cs
- SimpleRecyclingCache.cs
- NamedPipeTransportBindingElement.cs
- StoreAnnotationsMap.cs
- CodeIterationStatement.cs
- columnmapkeybuilder.cs
- _NativeSSPI.cs
- ColumnMapTranslator.cs
- FormattedTextSymbols.cs
- CheckBoxStandardAdapter.cs
- Helper.cs
- ipaddressinformationcollection.cs
- TargetConverter.cs