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
- FormClosedEvent.cs
- Slider.cs
- Evidence.cs
- PropertyAccessVisitor.cs
- CompilationUnit.cs
- PageBorderless.cs
- TextWriter.cs
- InstanceNameConverter.cs
- MeasureData.cs
- TextRunProperties.cs
- XmlBaseReader.cs
- LayoutEvent.cs
- BaseTemplateParser.cs
- XmlText.cs
- XmlDataImplementation.cs
- XmlFormatExtensionPrefixAttribute.cs
- XmlLinkedNode.cs
- CodeIdentifiers.cs
- BuildProviderUtils.cs
- TypeResolver.cs
- ParagraphResult.cs
- ObjectView.cs
- ControlCollection.cs
- XmlSerializerFactory.cs
- SmtpLoginAuthenticationModule.cs
- CodeRemoveEventStatement.cs
- CfgRule.cs
- PartialCachingControl.cs
- SizeKeyFrameCollection.cs
- PasswordRecovery.cs
- Icon.cs
- OracleFactory.cs
- CopyOnWriteList.cs
- FormViewActionList.cs
- LinkedResourceCollection.cs
- WSSecurityPolicy12.cs
- AuthorizationSection.cs
- BinaryNode.cs
- SingleTagSectionHandler.cs
- ToolStripPanelRenderEventArgs.cs
- FactoryGenerator.cs
- NameSpaceExtractor.cs
- GroupItem.cs
- NavigationWindowAutomationPeer.cs
- HtmlInputHidden.cs
- _CacheStreams.cs
- WebRequestModuleElementCollection.cs
- WmlSelectionListAdapter.cs
- TraceUtility.cs
- Visual3D.cs
- EventRoute.cs
- StateValidator.cs
- PenLineJoinValidation.cs
- TableItemPattern.cs
- EntitySqlException.cs
- MimeMultiPart.cs
- TogglePatternIdentifiers.cs
- CfgParser.cs
- SHA512Managed.cs
- DoubleConverter.cs
- ObjectDataSourceDisposingEventArgs.cs
- UnicodeEncoding.cs
- ConstructorArgumentAttribute.cs
- DrawingContextDrawingContextWalker.cs
- ListViewDeletedEventArgs.cs
- HttpMethodConstraint.cs
- DataControlImageButton.cs
- ObjectDataSourceMethodEditor.cs
- SerializationInfo.cs
- SafeBuffer.cs
- InputLanguageCollection.cs
- ListenDesigner.cs
- SchemaConstraints.cs
- ClientRuntimeConfig.cs
- RecordConverter.cs
- UIElementCollection.cs
- DSACryptoServiceProvider.cs
- Icon.cs
- StringFunctions.cs
- DataGridViewRowCancelEventArgs.cs
- XmlSchemaDocumentation.cs
- GenericsInstances.cs
- Expressions.cs
- SimpleTypesSurrogate.cs
- PriorityChain.cs
- Visual.cs
- XmlHierarchicalEnumerable.cs
- TransformGroup.cs
- ObjectDataSourceMethodEditor.cs
- Msec.cs
- Sql8ConformanceChecker.cs
- GPRECTF.cs
- CompilerGeneratedAttribute.cs
- InputLanguage.cs
- SoapElementAttribute.cs
- TaiwanLunisolarCalendar.cs
- UncommonField.cs
- NamedPipeTransportManager.cs
- InputBinding.cs
- Viewport3DAutomationPeer.cs