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, 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
- XmlChildNodes.cs
- DataGridViewCellValueEventArgs.cs
- UnsafeNativeMethods.cs
- _ConnectStream.cs
- FontCacheUtil.cs
- CodeAttributeArgumentCollection.cs
- BitmapEffectDrawingContent.cs
- SingleAnimationBase.cs
- DateTimeFormat.cs
- NativeBuffer.cs
- cache.cs
- CommonXSendMessage.cs
- ScrollableControl.cs
- XsltSettings.cs
- RawStylusInputCustomData.cs
- FileLogRecordEnumerator.cs
- ToolStripItemEventArgs.cs
- ColorTransform.cs
- ImageIndexConverter.cs
- SmiXetterAccessMap.cs
- XpsSerializationManager.cs
- ObjectCacheSettings.cs
- ActivityContext.cs
- ValidationPropertyAttribute.cs
- GroupBoxAutomationPeer.cs
- TimeZone.cs
- Encoder.cs
- WrapPanel.cs
- WindowsGraphicsCacheManager.cs
- ControlAdapter.cs
- IImplicitResourceProvider.cs
- FlowNode.cs
- WindowProviderWrapper.cs
- EventManager.cs
- DebugInfoGenerator.cs
- SingleStorage.cs
- Material.cs
- _ShellExpression.cs
- DataGridLinkButton.cs
- HighlightComponent.cs
- WebPartConnectionsCancelEventArgs.cs
- BaseUriWithWildcard.cs
- SignatureResourcePool.cs
- BitmapEffectInputConnector.cs
- SafeReversePInvokeHandle.cs
- FontWeight.cs
- AuthenticationSection.cs
- StreamUpdate.cs
- ScrollPatternIdentifiers.cs
- SurrogateEncoder.cs
- GradientStopCollection.cs
- InputDevice.cs
- ViewBase.cs
- ListBox.cs
- COMException.cs
- GCHandleCookieTable.cs
- RoleService.cs
- SapiGrammar.cs
- KnownTypesHelper.cs
- RectConverter.cs
- FrugalMap.cs
- ApplicationBuildProvider.cs
- ThemeableAttribute.cs
- DriveNotFoundException.cs
- regiisutil.cs
- TextAction.cs
- ExpressionWriter.cs
- CacheDependency.cs
- AccessorTable.cs
- OdbcRowUpdatingEvent.cs
- DataSpaceManager.cs
- XmlBinaryReaderSession.cs
- XmlRawWriterWrapper.cs
- TypeSystemProvider.cs
- MailWebEventProvider.cs
- StatusBarAutomationPeer.cs
- ProxyWebPart.cs
- ItemsControl.cs
- SharedUtils.cs
- ConsumerConnectionPointCollection.cs
- RowsCopiedEventArgs.cs
- SessionIDManager.cs
- TimeSpanFormat.cs
- InvalidMessageContractException.cs
- XmlComplianceUtil.cs
- FixedNode.cs
- SoapReflector.cs
- ManualWorkflowSchedulerService.cs
- FontFamily.cs
- HttpContextServiceHost.cs
- KeyedHashAlgorithm.cs
- QilReplaceVisitor.cs
- LinkLabelLinkClickedEvent.cs
- IRCollection.cs
- LockedActivityGlyph.cs
- PlainXmlDeserializer.cs
- CompilationUtil.cs
- InputScope.cs
- _StreamFramer.cs
- FakeModelPropertyImpl.cs