Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / ExtentCqlBlock.cs / 1 / ExtentCqlBlock.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Text; using System.Collections.Generic; using System.Data.Mapping.ViewGeneration.Structures; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.Mapping.ViewGeneration.CqlGeneration { // A class that corresponds to the leaf CQL Blocks in the CqlBlock tree internal class ExtentCqlBlock : CqlBlock { private static readonly ListEmptyChildren = new List (); #region Constructors // effects: Creates an Extent CqlBlock corresponding to // "extent" (the FROM part). SELECT is given by slots, WHERE by // whereClause and AS by blockAliasNum internal ExtentCqlBlock(EntitySetBase extent, SlotInfo[] slots, BoolExpression whereClause, CqlIdentifiers identifiers, int blockAliasNum) : base(slots, EmptyChildren, whereClause, identifiers, blockAliasNum) { m_extent = extent; m_nodeTableAlias = identifiers.GetBlockAlias(); } #endregion #region Fields private EntitySetBase m_extent; // The extent for which we have this block private string m_nodeTableAlias; #endregion #region Methods // effects: See CqlBlock.AsCql internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) { // The SELECT part GenerateProjectedtList(builder, indentLevel, m_nodeTableAlias, false); // Get the FROM part builder.Append("FROM "); // Get the extent object in C-Space (if m_extent is an S space object) CqlWriter.AppendEscapedQualifiedName(builder, m_extent.EntityContainer.Name, m_extent.Name); builder.Append(" AS ") .Append(m_nodeTableAlias); // Get the WHERE part only when the expression is not simply TRUE if (false == BoolExpression.EqualityComparer.Equals(WhereClause, BoolExpression.True)) { StringUtil.IndentNewLine(builder, indentLevel); builder.Append("WHERE "); WhereClause.AsCql(builder, m_nodeTableAlias); } 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.Text; using System.Collections.Generic; using System.Data.Mapping.ViewGeneration.Structures; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.Mapping.ViewGeneration.CqlGeneration { // A class that corresponds to the leaf CQL Blocks in the CqlBlock tree internal class ExtentCqlBlock : CqlBlock { private static readonly ListEmptyChildren = new List (); #region Constructors // effects: Creates an Extent CqlBlock corresponding to // "extent" (the FROM part). SELECT is given by slots, WHERE by // whereClause and AS by blockAliasNum internal ExtentCqlBlock(EntitySetBase extent, SlotInfo[] slots, BoolExpression whereClause, CqlIdentifiers identifiers, int blockAliasNum) : base(slots, EmptyChildren, whereClause, identifiers, blockAliasNum) { m_extent = extent; m_nodeTableAlias = identifiers.GetBlockAlias(); } #endregion #region Fields private EntitySetBase m_extent; // The extent for which we have this block private string m_nodeTableAlias; #endregion #region Methods // effects: See CqlBlock.AsCql internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) { // The SELECT part GenerateProjectedtList(builder, indentLevel, m_nodeTableAlias, false); // Get the FROM part builder.Append("FROM "); // Get the extent object in C-Space (if m_extent is an S space object) CqlWriter.AppendEscapedQualifiedName(builder, m_extent.EntityContainer.Name, m_extent.Name); builder.Append(" AS ") .Append(m_nodeTableAlias); // Get the WHERE part only when the expression is not simply TRUE if (false == BoolExpression.EqualityComparer.Equals(WhereClause, BoolExpression.True)) { StringUtil.IndentNewLine(builder, indentLevel); builder.Append("WHERE "); WhereClause.AsCql(builder, m_nodeTableAlias); } 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
- ConfigViewGenerator.cs
- ReferenceEqualityComparer.cs
- EventTrigger.cs
- PartitionerQueryOperator.cs
- DigitShape.cs
- QueryRewriter.cs
- ByteConverter.cs
- ActionFrame.cs
- TextUtf8RawTextWriter.cs
- BaseTemplateParser.cs
- SectionInput.cs
- ConnectionManagementElement.cs
- SecurityContext.cs
- shaperfactoryquerycacheentry.cs
- SettingsPropertyCollection.cs
- StrongNamePublicKeyBlob.cs
- TileBrush.cs
- XmlWhitespace.cs
- XmlNodeChangedEventManager.cs
- SystemIdentity.cs
- StrokeDescriptor.cs
- SimpleHandlerBuildProvider.cs
- HeaderUtility.cs
- WindowAutomationPeer.cs
- ListDataHelper.cs
- RowVisual.cs
- XpsFilter.cs
- COM2TypeInfoProcessor.cs
- DiagnosticTraceSource.cs
- UpdateDelegates.Generated.cs
- GroupByExpressionRewriter.cs
- DeploymentSectionCache.cs
- JulianCalendar.cs
- WebFaultClientMessageInspector.cs
- GlobalEventManager.cs
- AnnotationResource.cs
- IconBitmapDecoder.cs
- DependencyObject.cs
- BypassElementCollection.cs
- PropertyConverter.cs
- TextFormattingConverter.cs
- BitStack.cs
- SessionKeyExpiredException.cs
- X509SubjectKeyIdentifierClause.cs
- TypeDelegator.cs
- GridToolTip.cs
- MasterPageCodeDomTreeGenerator.cs
- AdornedElementPlaceholder.cs
- TargetControlTypeCache.cs
- EventArgs.cs
- MetabaseSettings.cs
- DrawingAttributeSerializer.cs
- SignatureGenerator.cs
- EndOfStreamException.cs
- TextAnchor.cs
- WeakEventManager.cs
- HostingEnvironmentException.cs
- DataTemplateSelector.cs
- cookiecontainer.cs
- XPathScanner.cs
- MenuItemStyleCollection.cs
- BezierSegment.cs
- ThreadExceptionEvent.cs
- SafeReversePInvokeHandle.cs
- ProfileSettingsCollection.cs
- WindowsListView.cs
- CustomError.cs
- LogExtentCollection.cs
- OpenTypeLayoutCache.cs
- AuthenticatingEventArgs.cs
- UInt16Storage.cs
- arc.cs
- SharedHttpTransportManager.cs
- LogicalExpressionTypeConverter.cs
- HtmlHistory.cs
- AttachedPropertyInfo.cs
- AdRotatorDesigner.cs
- PerformanceCounterCategory.cs
- SettingsPropertyCollection.cs
- SizeValueSerializer.cs
- ObjectDisposedException.cs
- TextReturnReader.cs
- DetailsViewPageEventArgs.cs
- BoolExpression.cs
- KeyInfo.cs
- InputProcessorProfilesLoader.cs
- EntityDataSourceChangedEventArgs.cs
- SingleAnimationUsingKeyFrames.cs
- PolicyReader.cs
- CellTreeNodeVisitors.cs
- BitmapMetadata.cs
- TransformDescriptor.cs
- BindingBase.cs
- TypedReference.cs
- WSSecurityXXX2005.cs
- FieldMetadata.cs
- GridLengthConverter.cs
- RSACryptoServiceProvider.cs
- DbReferenceCollection.cs
- ItemContainerPattern.cs