Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DefaultHttpHandler.cs
- Grid.cs
- StreamInfo.cs
- DependencyProperty.cs
- Marshal.cs
- MaskInputRejectedEventArgs.cs
- DefaultTraceListener.cs
- RegisteredArrayDeclaration.cs
- ArrayConverter.cs
- DateTimeSerializationSection.cs
- UInt32Storage.cs
- PropertyEmitterBase.cs
- EpmContentSerializer.cs
- Html32TextWriter.cs
- SmtpFailedRecipientException.cs
- TextAutomationPeer.cs
- SqlTypeConverter.cs
- UIElementCollection.cs
- ClrPerspective.cs
- StrongNameHelpers.cs
- MSHTMLHost.cs
- DataServiceQueryOfT.cs
- Visitor.cs
- RightsManagementPermission.cs
- FormatControl.cs
- SecurityPermission.cs
- QueryOutputWriter.cs
- HierarchicalDataBoundControlAdapter.cs
- TransformerTypeCollection.cs
- TemplateField.cs
- XsltFunctions.cs
- BridgeDataRecord.cs
- InlinedLocationReference.cs
- DataRecordInfo.cs
- XmlSchemaProviderAttribute.cs
- VectorAnimationBase.cs
- CodeVariableDeclarationStatement.cs
- UnaryOperationBinder.cs
- RecognitionResult.cs
- WSUtilitySpecificationVersion.cs
- CultureInfoConverter.cs
- HttpWebResponse.cs
- ConcurrentDictionary.cs
- FontStyleConverter.cs
- ParameterCollection.cs
- SerializationStore.cs
- HttpInputStream.cs
- MailWebEventProvider.cs
- ReadOnlyMetadataCollection.cs
- CurrentTimeZone.cs
- IteratorFilter.cs
- EntityDataSourceContextCreatedEventArgs.cs
- CompositeFontFamily.cs
- LineServicesCallbacks.cs
- DesignerTextWriter.cs
- BaseParser.cs
- CurrentChangedEventManager.cs
- SqlStream.cs
- FollowerQueueCreator.cs
- LassoSelectionBehavior.cs
- TextEffect.cs
- FileChangesMonitor.cs
- UIPermission.cs
- DrawListViewColumnHeaderEventArgs.cs
- RoleGroupCollection.cs
- NativeMethods.cs
- ListViewTableRow.cs
- ConnectionPoolRegistry.cs
- behaviorssection.cs
- __TransparentProxy.cs
- Padding.cs
- MdImport.cs
- DesignBindingValueUIHandler.cs
- XmlSchemaAttribute.cs
- WebUtil.cs
- UrlAuthorizationModule.cs
- EntityObject.cs
- ToolStripComboBox.cs
- JulianCalendar.cs
- MSG.cs
- ResourcePropertyMemberCodeDomSerializer.cs
- XmlIlTypeHelper.cs
- HijriCalendar.cs
- AesManaged.cs
- XmlCustomFormatter.cs
- DataGridViewCellStyle.cs
- ClientTargetSection.cs
- exports.cs
- QilTernary.cs
- QilLiteral.cs
- StrokeNodeData.cs
- OneOf.cs
- DES.cs
- QilName.cs
- CalendarBlackoutDatesCollection.cs
- PriorityBindingExpression.cs
- LayoutSettings.cs
- ToolStrip.cs
- RectAnimationBase.cs
- OrderedDictionary.cs