Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- UntrustedRecipientException.cs
- SecurityState.cs
- FontStyle.cs
- DateTimeFormat.cs
- TemplateControlBuildProvider.cs
- HtmlButton.cs
- IsolatedStoragePermission.cs
- AspCompat.cs
- DataViewSetting.cs
- EntityDataSource.cs
- ComEventsMethod.cs
- BatchParser.cs
- XmlChildNodes.cs
- DataStorage.cs
- ReflectPropertyDescriptor.cs
- SafeRightsManagementHandle.cs
- XmlUrlResolver.cs
- XmlImplementation.cs
- BypassElement.cs
- CopyNodeSetAction.cs
- TcpClientChannel.cs
- SoundPlayerAction.cs
- RightsManagementInformation.cs
- ResourceIDHelper.cs
- GridProviderWrapper.cs
- ToolboxBitmapAttribute.cs
- ReadOnlyDataSourceView.cs
- DataGridViewCellPaintingEventArgs.cs
- FilterQuery.cs
- JsonFormatGeneratorStatics.cs
- HostProtectionPermission.cs
- FtpWebResponse.cs
- HostedTransportConfigurationManager.cs
- AnonymousIdentificationModule.cs
- XPathNodeList.cs
- UserControlBuildProvider.cs
- MachineSettingsSection.cs
- RuleSetDialog.Designer.cs
- SqlDataSourceQueryEditorForm.cs
- DrawListViewSubItemEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- SoapSchemaExporter.cs
- CodeTypeParameterCollection.cs
- KeyedHashAlgorithm.cs
- TextCompositionManager.cs
- ModifiableIteratorCollection.cs
- QilReference.cs
- ColorKeyFrameCollection.cs
- AutomationTextAttribute.cs
- arclist.cs
- WebPartManagerDesigner.cs
- CompositeCollection.cs
- EntitySetDataBindingList.cs
- GroupPartitionExpr.cs
- SecurityTokenParameters.cs
- StyleBamlRecordReader.cs
- AesManaged.cs
- TdsParser.cs
- Transform3DGroup.cs
- TypedElement.cs
- LayoutTable.cs
- StandardCommands.cs
- RegexStringValidatorAttribute.cs
- DataTableClearEvent.cs
- DetailsViewDeletedEventArgs.cs
- PseudoWebRequest.cs
- HtmlControlAdapter.cs
- EncoderBestFitFallback.cs
- UndirectedGraph.cs
- MenuItemBinding.cs
- FixedSOMTableRow.cs
- NamespaceExpr.cs
- WebRequestModulesSection.cs
- ResourcesBuildProvider.cs
- CommonXSendMessage.cs
- ProviderCollection.cs
- TemplatedAdorner.cs
- CodeConditionStatement.cs
- SecurityTokenReferenceStyle.cs
- SplineKeyFrames.cs
- WebServiceErrorEvent.cs
- Perspective.cs
- Transform3D.cs
- EntityObject.cs
- ConstraintEnumerator.cs
- ClientTargetCollection.cs
- DataBindingExpressionBuilder.cs
- QilTargetType.cs
- DbgUtil.cs
- DispatchWrapper.cs
- SecurityPermission.cs
- BinaryUtilClasses.cs
- QilCloneVisitor.cs
- DPCustomTypeDescriptor.cs
- VisualStyleInformation.cs
- ProgressBarHighlightConverter.cs
- DataServiceProviderMethods.cs
- FontStretches.cs
- SecurityManager.cs
- DataPagerFieldItem.cs