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
- Simplifier.cs
- ToolStripItemRenderEventArgs.cs
- ProcessThreadDesigner.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- PassportAuthenticationEventArgs.cs
- LocalBuilder.cs
- TrailingSpaceComparer.cs
- SqlConnection.cs
- MD5.cs
- ContentOperations.cs
- NoClickablePointException.cs
- TreeNode.cs
- Win32PrintDialog.cs
- UpdatePanelTrigger.cs
- MessageDescription.cs
- CapabilitiesAssignment.cs
- PropertyTab.cs
- SiteMapPath.cs
- PenContext.cs
- UnsettableComboBox.cs
- BindableAttribute.cs
- DiscoveryReferences.cs
- Error.cs
- SystemIPInterfaceStatistics.cs
- ObjectTag.cs
- CheckBox.cs
- TraceHandler.cs
- Int32Rect.cs
- FrameAutomationPeer.cs
- LOSFormatter.cs
- TextChangedEventArgs.cs
- WindowsFormsHostAutomationPeer.cs
- ScrollProperties.cs
- WindowsListView.cs
- DataServiceExpressionVisitor.cs
- XmlNodeChangedEventArgs.cs
- CodeMemberField.cs
- FocusChangedEventArgs.cs
- RepeatInfo.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- WindowsTitleBar.cs
- FileAuthorizationModule.cs
- MultiBinding.cs
- LocalizeDesigner.cs
- DataGridViewCell.cs
- ClassicBorderDecorator.cs
- EntityType.cs
- BindingMAnagerBase.cs
- HostProtectionPermission.cs
- ConfigurationSettings.cs
- DetailsViewDesigner.cs
- MailWebEventProvider.cs
- FormsIdentity.cs
- dbenumerator.cs
- RemoteWebConfigurationHostStream.cs
- VisualBasicImportReference.cs
- AsymmetricSignatureDeformatter.cs
- BorderGapMaskConverter.cs
- PermissionSetEnumerator.cs
- CodeThrowExceptionStatement.cs
- WorkflowQueuingService.cs
- SetterBaseCollection.cs
- _NTAuthentication.cs
- CheckBox.cs
- _IPv6Address.cs
- UnsafeNativeMethodsTablet.cs
- PresentationAppDomainManager.cs
- ListViewItemSelectionChangedEvent.cs
- SaveRecipientRequest.cs
- Operators.cs
- Block.cs
- UnsafeNativeMethods.cs
- Oid.cs
- ProfessionalColorTable.cs
- DiscoveryClientOutputChannel.cs
- SQLUtility.cs
- XamlTemplateSerializer.cs
- ReadWriteObjectLock.cs
- TextServicesContext.cs
- StandardCommands.cs
- DataBindingList.cs
- ChannelManager.cs
- MouseButton.cs
- TimersDescriptionAttribute.cs
- FixedHyperLink.cs
- XPathParser.cs
- ControlHelper.cs
- TranslateTransform.cs
- IApplicationTrustManager.cs
- RoutedEventConverter.cs
- Hyperlink.cs
- OperationResponse.cs
- SecondaryViewProvider.cs
- OdbcConnection.cs
- TemplateKey.cs
- ExtentKey.cs
- BindableTemplateBuilder.cs
- TextTreeExtractElementUndoUnit.cs
- Repeater.cs
- DataGridViewHitTestInfo.cs