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
- MatrixValueSerializer.cs
- ExpandCollapseProviderWrapper.cs
- thaishape.cs
- FixedNode.cs
- Query.cs
- Pts.cs
- EventListener.cs
- DateTimeValueSerializerContext.cs
- ImageCodecInfoPrivate.cs
- SHA384.cs
- WindowsFormsHelpers.cs
- TextElementCollectionHelper.cs
- PartialArray.cs
- ProjectionCamera.cs
- DataGridViewTextBoxEditingControl.cs
- SystemPens.cs
- StringWriter.cs
- RuleSettings.cs
- SoapAttributeOverrides.cs
- EventLogStatus.cs
- DefaultValueConverter.cs
- BasicHttpMessageSecurity.cs
- RelatedImageListAttribute.cs
- OracleNumber.cs
- Compilation.cs
- DataFieldCollectionEditor.cs
- SqlCharStream.cs
- WindowsToolbar.cs
- RelatedPropertyManager.cs
- AmbientValueAttribute.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- AttachedPropertyBrowsableAttribute.cs
- ValidationRuleCollection.cs
- CalendarDay.cs
- Group.cs
- XhtmlBasicListAdapter.cs
- HtmlFormAdapter.cs
- SizeAnimationUsingKeyFrames.cs
- ErrorFormatter.cs
- UriSection.cs
- GraphicsContext.cs
- HttpMethodAttribute.cs
- ZoneMembershipCondition.cs
- MetadataCache.cs
- cookie.cs
- ActiveXSerializer.cs
- RoutedEvent.cs
- WebPartUtil.cs
- SiteIdentityPermission.cs
- MetafileHeader.cs
- PropertyCollection.cs
- DoubleIndependentAnimationStorage.cs
- XPathPatternBuilder.cs
- WeakReference.cs
- TCEAdapterGenerator.cs
- PropertyConverter.cs
- QuadraticBezierSegment.cs
- BinaryMethodMessage.cs
- Sequence.cs
- DrawingContextWalker.cs
- DesignerGeometryHelper.cs
- PersonalizationProvider.cs
- BindingMemberInfo.cs
- SqlDataSourceView.cs
- ProcessManager.cs
- InstancePersistenceEvent.cs
- ContextBase.cs
- Misc.cs
- GridViewCancelEditEventArgs.cs
- RadioButton.cs
- _AcceptOverlappedAsyncResult.cs
- SqlFactory.cs
- DataGridViewComboBoxEditingControl.cs
- MatrixAnimationUsingKeyFrames.cs
- StyleBamlTreeBuilder.cs
- EDesignUtil.cs
- ProfileEventArgs.cs
- SystemNetworkInterface.cs
- UniqueEventHelper.cs
- ResourceExpressionEditorSheet.cs
- ValidatorCompatibilityHelper.cs
- Ipv6Element.cs
- TextBoxDesigner.cs
- SignatureConfirmationElement.cs
- EmptyControlCollection.cs
- ColorAnimation.cs
- NavigationWindow.cs
- ProcessStartInfo.cs
- EntityContainerEmitter.cs
- IntSecurity.cs
- SystemInfo.cs
- Command.cs
- WindowsRegion.cs
- DataServiceKeyAttribute.cs
- DetailsViewDeleteEventArgs.cs
- CodeTypeParameterCollection.cs
- DialogBaseForm.cs
- PrintingPermission.cs
- ClientUtils.cs
- ScriptingSectionGroup.cs