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, List children, 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, List children, 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
- ValueUnavailableException.cs
- Rights.cs
- Brush.cs
- SHA384.cs
- MatrixAnimationUsingKeyFrames.cs
- Thread.cs
- ParseHttpDate.cs
- ColorMatrix.cs
- CommonObjectSecurity.cs
- CssClassPropertyAttribute.cs
- ClientTargetCollection.cs
- TextEndOfLine.cs
- DataBindingList.cs
- _Connection.cs
- TargetFrameworkAttribute.cs
- DataTemplate.cs
- PropertyChangedEventManager.cs
- DictionarySurrogate.cs
- XslCompiledTransform.cs
- Cursor.cs
- control.ime.cs
- DetailsViewModeEventArgs.cs
- DataTableExtensions.cs
- x509utils.cs
- Site.cs
- OleDbPermission.cs
- TableLayoutSettings.cs
- arc.cs
- TextBoxRenderer.cs
- ScrollItemProviderWrapper.cs
- FixedTextSelectionProcessor.cs
- BitmapEffectInputConnector.cs
- Adorner.cs
- UrlPath.cs
- RemotingSurrogateSelector.cs
- CompositionAdorner.cs
- ProfileSection.cs
- SerializationHelper.cs
- BufferModeSettings.cs
- SecUtil.cs
- ConnectionInterfaceCollection.cs
- ImageKeyConverter.cs
- FixedSOMSemanticBox.cs
- RepeaterItem.cs
- NativeMethods.cs
- ActivationServices.cs
- ImageFormatConverter.cs
- WindowsGrip.cs
- ProxyManager.cs
- XmlIlVisitor.cs
- InlinedAggregationOperatorEnumerator.cs
- TypeNameConverter.cs
- Int64AnimationBase.cs
- SqlConnectionHelper.cs
- MdiWindowListStrip.cs
- recordstatefactory.cs
- CollectionsUtil.cs
- ObjectQuery_EntitySqlExtensions.cs
- Monitor.cs
- IERequestCache.cs
- ProgressiveCrcCalculatingStream.cs
- WebPartRestoreVerb.cs
- NativeMethods.cs
- ScrollItemProviderWrapper.cs
- PageBuildProvider.cs
- ConditionalWeakTable.cs
- ErrorWrapper.cs
- Cloud.cs
- StylusCollection.cs
- TransactionFilter.cs
- Math.cs
- PageStatePersister.cs
- XmlILAnnotation.cs
- BuildManagerHost.cs
- Timeline.cs
- EditorZone.cs
- SpellerInterop.cs
- Color.cs
- XmlSchemaGroup.cs
- PageBreakRecord.cs
- ThemeableAttribute.cs
- CoTaskMemHandle.cs
- NameSpaceEvent.cs
- UrlPropertyAttribute.cs
- SQLBinaryStorage.cs
- RegionIterator.cs
- XsltSettings.cs
- WebPartRestoreVerb.cs
- RelAssertionDirectKeyIdentifierClause.cs
- CreatingCookieEventArgs.cs
- WeakHashtable.cs
- DtdParser.cs
- SessionPageStateSection.cs
- XmlSchemaIdentityConstraint.cs
- ObjectAnimationBase.cs
- WebPartDisplayModeCollection.cs
- UnsafeNativeMethods.cs
- DataConnectionHelper.cs
- ParameterExpression.cs
- SystemUnicastIPAddressInformation.cs