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
- PersonalizationDictionary.cs
- SettingsBase.cs
- RenamedEventArgs.cs
- XmlNodeList.cs
- ApplicationId.cs
- IndicCharClassifier.cs
- JsonWriter.cs
- DocumentPageHost.cs
- CapabilitiesSection.cs
- NamespaceMapping.cs
- TextWriterTraceListener.cs
- ModuleElement.cs
- _WinHttpWebProxyDataBuilder.cs
- InstancePersistenceException.cs
- CollectionBase.cs
- GeneralTransform3D.cs
- HtmlInputReset.cs
- HtmlInputImage.cs
- Brush.cs
- ConnectionStringSettings.cs
- SessionStateItemCollection.cs
- DetailsViewPagerRow.cs
- Overlapped.cs
- WaitHandle.cs
- _HeaderInfo.cs
- URLMembershipCondition.cs
- EmptyStringExpandableObjectConverter.cs
- PriorityChain.cs
- WebBrowser.cs
- ADMembershipProvider.cs
- TransportationConfigurationTypeInstallComponent.cs
- SmtpClient.cs
- ConfigurationLocationCollection.cs
- CodeAttributeArgument.cs
- CommonDialog.cs
- DBPropSet.cs
- ScrollChangedEventArgs.cs
- BuildManager.cs
- TextSelectionHelper.cs
- TriState.cs
- GridToolTip.cs
- DivideByZeroException.cs
- Version.cs
- versioninfo.cs
- NumericUpDownAccelerationCollection.cs
- StylusButtonCollection.cs
- Journaling.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- AdRotator.cs
- SQLStringStorage.cs
- NonceToken.cs
- WithStatement.cs
- COSERVERINFO.cs
- ConfigurationValidatorAttribute.cs
- IdentityModelDictionary.cs
- MediaPlayer.cs
- ByteStorage.cs
- ClientRuntimeConfig.cs
- ListBoxChrome.cs
- OutputCacheSettings.cs
- MemberInfoSerializationHolder.cs
- X509Certificate.cs
- ContentPlaceHolder.cs
- ConnectionManagementElementCollection.cs
- ObjectListFieldsPage.cs
- DetailsViewRow.cs
- Util.cs
- DateTimeConverter2.cs
- LayoutEngine.cs
- ProcessRequestArgs.cs
- Guid.cs
- TreeIterator.cs
- DbProviderServices.cs
- Util.cs
- EncodingNLS.cs
- ReadContentAsBinaryHelper.cs
- Latin1Encoding.cs
- NetworkInterface.cs
- Facet.cs
- JsonSerializer.cs
- CodeVariableDeclarationStatement.cs
- BooleanSwitch.cs
- log.cs
- TypeReference.cs
- DataGridParentRows.cs
- InkSerializer.cs
- XmlReflectionMember.cs
- MultipleCopiesCollection.cs
- MatrixTransform3D.cs
- Baml2006ReaderContext.cs
- DefaultEvaluationContext.cs
- ActivityExecutorOperation.cs
- DelegateSerializationHolder.cs
- PartialCachingAttribute.cs
- ClearTypeHintValidation.cs
- DataGridItemAutomationPeer.cs
- RIPEMD160Managed.cs
- RenderCapability.cs
- SharedConnectionInfo.cs
- ObjectConverter.cs