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
- FixedTextBuilder.cs
- AuthenticationService.cs
- DataDocumentXPathNavigator.cs
- hresults.cs
- QuaternionRotation3D.cs
- NativeActivityMetadata.cs
- OpenTypeLayout.cs
- WindowsFormsHost.cs
- X509Extension.cs
- MulticastOption.cs
- webproxy.cs
- Console.cs
- SchemaImporterExtensionElement.cs
- SqlPersonalizationProvider.cs
- datacache.cs
- IconBitmapDecoder.cs
- CompositeClientFormatter.cs
- HitTestParameters.cs
- FixedSOMTable.cs
- MessageDesigner.cs
- BlurBitmapEffect.cs
- XmlUtilWriter.cs
- Transform3D.cs
- IdentifierCollection.cs
- Variable.cs
- SapiInterop.cs
- DataControlHelper.cs
- BinaryWriter.cs
- Bitmap.cs
- HandlerFactoryWrapper.cs
- WebControlAdapter.cs
- HttpFileCollection.cs
- DataServiceStreamProviderWrapper.cs
- XmlEncoding.cs
- ServicePoint.cs
- diagnosticsswitches.cs
- IfJoinedCondition.cs
- HMACSHA1.cs
- ExceptionHelpers.cs
- RSAPKCS1SignatureDeformatter.cs
- QueryReaderSettings.cs
- DependencyObjectProvider.cs
- SettingsSection.cs
- ValidationRule.cs
- SelectionManager.cs
- TypeResolver.cs
- RightsManagementManager.cs
- DbParameterCollectionHelper.cs
- ProfileSection.cs
- CodeAccessPermission.cs
- _IPv4Address.cs
- CqlParser.cs
- DataGridColumn.cs
- PermissionAttributes.cs
- FileSystemWatcher.cs
- SqlDataSourceConfigureSortForm.cs
- XsdDataContractExporter.cs
- SvcMapFileSerializer.cs
- WsdlInspector.cs
- MruCache.cs
- ContractHandle.cs
- WebExceptionStatus.cs
- ToolBar.cs
- Types.cs
- FolderBrowserDialog.cs
- HostProtectionPermission.cs
- DesigntimeLicenseContextSerializer.cs
- WebPartUtil.cs
- AssemblySettingAttributes.cs
- validationstate.cs
- WSTrustDec2005.cs
- ObjectManager.cs
- PageBreakRecord.cs
- GiveFeedbackEvent.cs
- TrackBar.cs
- SqlNodeTypeOperators.cs
- TypeUtil.cs
- ArcSegment.cs
- IODescriptionAttribute.cs
- CqlGenerator.cs
- DataGridViewImageColumn.cs
- MultipartIdentifier.cs
- FixedElement.cs
- SystemIdentity.cs
- SqlBulkCopy.cs
- SoapFault.cs
- KeyboardEventArgs.cs
- ListViewGroup.cs
- PeerSecurityManager.cs
- UnicodeEncoding.cs
- Debug.cs
- AsnEncodedData.cs
- PropertyMapper.cs
- InputBuffer.cs
- PointCollection.cs
- DataPagerFieldCollection.cs
- LoadRetryAsyncResult.cs
- Helper.cs
- InstanceOwner.cs
- XNameConverter.cs