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
- SortAction.cs
- ObjectResult.cs
- ListBoxChrome.cs
- Point3DCollection.cs
- cookiecontainer.cs
- UInt64Storage.cs
- SmiRequestExecutor.cs
- OrderByQueryOptionExpression.cs
- SharedPerformanceCounter.cs
- WebServiceFault.cs
- BitmapDownload.cs
- GenericWebPart.cs
- PixelFormatConverter.cs
- DbgUtil.cs
- StorageMappingItemLoader.cs
- RootBuilder.cs
- GridItem.cs
- OptionalMessageQuery.cs
- WindowsClaimSet.cs
- PointIndependentAnimationStorage.cs
- CriticalHandle.cs
- CompilerLocalReference.cs
- CellConstant.cs
- RequestCacheValidator.cs
- ListBindableAttribute.cs
- WorkflowInlining.cs
- TreeView.cs
- XPathNodePointer.cs
- BStrWrapper.cs
- BitmapSource.cs
- TextServicesHost.cs
- XmlHierarchicalEnumerable.cs
- XmlHierarchicalDataSourceView.cs
- EventRouteFactory.cs
- HtmlContainerControl.cs
- PaintValueEventArgs.cs
- Margins.cs
- SemanticResultValue.cs
- _TimerThread.cs
- DSASignatureDeformatter.cs
- TraceListeners.cs
- ListViewItem.cs
- FileLevelControlBuilderAttribute.cs
- ReadWriteSpinLock.cs
- WebEventTraceProvider.cs
- FormViewDeleteEventArgs.cs
- RemotingException.cs
- ValidationEventArgs.cs
- FillErrorEventArgs.cs
- SerialStream.cs
- DiagnosticsConfigurationHandler.cs
- HMACSHA256.cs
- followingquery.cs
- Registry.cs
- Line.cs
- TraceContext.cs
- ConfigViewGenerator.cs
- COM2IPerPropertyBrowsingHandler.cs
- OdbcReferenceCollection.cs
- ParagraphResult.cs
- CompositeControl.cs
- SiteMapSection.cs
- SamlSubjectStatement.cs
- datacache.cs
- PrtCap_Builder.cs
- Int64Animation.cs
- WebDescriptionAttribute.cs
- ContractNamespaceAttribute.cs
- EmptyQuery.cs
- StringFreezingAttribute.cs
- LineInfo.cs
- DataGridViewComboBoxEditingControl.cs
- TreeNodeBindingDepthConverter.cs
- SettingsPropertyValue.cs
- ObjectViewListener.cs
- SubclassTypeValidator.cs
- SafeTokenHandle.cs
- SessionViewState.cs
- AppSettingsReader.cs
- CopyAction.cs
- TextServicesCompartment.cs
- CompressionTracing.cs
- BamlLocalizationDictionary.cs
- SchemaComplexType.cs
- MulticastNotSupportedException.cs
- ComplexBindingPropertiesAttribute.cs
- KnowledgeBase.cs
- XPathQueryGenerator.cs
- SerializationSectionGroup.cs
- ErrorFormatterPage.cs
- ZipIOLocalFileHeader.cs
- DataGridViewColumnCollection.cs
- InstanceOwnerException.cs
- Instrumentation.cs
- PrtCap_Base.cs
- QueryCacheKey.cs
- ConstraintEnumerator.cs
- TypeNameConverter.cs
- TextElementEnumerator.cs
- CurrentChangedEventManager.cs