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
- CryptoApi.cs
- IRCollection.cs
- RawKeyboardInputReport.cs
- SqlDataSourceWizardForm.cs
- SqlPersonalizationProvider.cs
- SqlResolver.cs
- ForeignKeyConstraint.cs
- WindowsSpinner.cs
- ResXDataNode.cs
- DelegateBodyWriter.cs
- ThrowHelper.cs
- WebBrowserUriTypeConverter.cs
- ColorBlend.cs
- _StreamFramer.cs
- EventLogEntry.cs
- DataPagerFieldCollection.cs
- TreeIterator.cs
- Rect3DValueSerializer.cs
- DesignerForm.cs
- DataGridViewImageColumn.cs
- ExceptionRoutedEventArgs.cs
- SignalGate.cs
- XmlWhitespace.cs
- OleDbSchemaGuid.cs
- QuaternionConverter.cs
- WebConfigurationFileMap.cs
- DependentList.cs
- BindUriHelper.cs
- FileVersionInfo.cs
- TextBoxAutomationPeer.cs
- DependencyPropertyKind.cs
- NativeMethods.cs
- TreeViewTemplateSelector.cs
- DictionaryBase.cs
- PermissionSetTriple.cs
- FrameworkContentElement.cs
- CodePageEncoding.cs
- RequestQueue.cs
- DrawingVisualDrawingContext.cs
- Propagator.JoinPropagator.cs
- QuaternionAnimation.cs
- RadioButtonRenderer.cs
- TabControlAutomationPeer.cs
- UrlUtility.cs
- TemplatedWizardStep.cs
- StreamWriter.cs
- CollectionsUtil.cs
- NullableDoubleSumAggregationOperator.cs
- ReadonlyMessageFilter.cs
- TextParaClient.cs
- ConcurrentStack.cs
- DeploymentExceptionMapper.cs
- CurrentTimeZone.cs
- Style.cs
- XmlDataSourceNodeDescriptor.cs
- BrushValueSerializer.cs
- XmlParserContext.cs
- LostFocusEventManager.cs
- ThrowHelper.cs
- SerializationEventsCache.cs
- ImageButton.cs
- AutomationPatternInfo.cs
- Package.cs
- PaintEvent.cs
- Expressions.cs
- Pen.cs
- JoinGraph.cs
- FormsIdentity.cs
- MachineKeySection.cs
- MissingManifestResourceException.cs
- PageSettings.cs
- PeerObject.cs
- DataGridViewCellStateChangedEventArgs.cs
- EventInfo.cs
- SerializationEventsCache.cs
- HtmlContainerControl.cs
- BamlBinaryWriter.cs
- Point.cs
- TypeUtil.cs
- StickyNoteHelper.cs
- XsltLoader.cs
- TransformerInfoCollection.cs
- XmlNodeReader.cs
- HostingPreferredMapPath.cs
- Compiler.cs
- RegexCode.cs
- RuntimeIdentifierPropertyAttribute.cs
- safex509handles.cs
- XmlSchemaAnnotated.cs
- ImageConverter.cs
- ToolStripContainerActionList.cs
- IsolationInterop.cs
- ByteKeyFrameCollection.cs
- SettingsPropertyWrongTypeException.cs
- ResourcePermissionBase.cs
- TextServicesPropertyRanges.cs
- XmlDocumentSerializer.cs
- SqlNodeTypeOperators.cs
- GraphicsContainer.cs
- JoinElimination.cs