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 / SqlClient / SqlGen / JoinSymbol.cs / 1 / JoinSymbol.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....], [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Data.Metadata.Edm;
using System.Data.Common.CommandTrees;
namespace System.Data.SqlClient.SqlGen
{
///
/// A Join symbol is a special kind of Symbol.
/// It has to carry additional information
///
/// - ColumnList for the list of columns in the select clause if this
/// symbol represents a sql select statement. This is set by
.
/// - ExtentList is the list of extents in the select clause.
/// - FlattenedExtentList - if the Join has multiple extents flattened at the
/// top level, we need this information to ensure that extent aliases are renamed
/// correctly in
/// - NameToExtent has all the extents in ExtentList as a dictionary.
/// This is used by
to flatten
/// record accesses.
/// - IsNestedJoin - is used to determine whether a JoinSymbol is an
/// ordinary join symbol, or one that has a corresponding SqlSelectStatement.
///
///
/// All the lists are set exactly once, and then used for lookups/enumerated.
///
internal sealed class JoinSymbol : Symbol
{
private List columnList;
internal List ColumnList
{
get
{
if (null == columnList)
{
columnList = new List();
}
return columnList;
}
set { columnList = value; }
}
private List extentList;
internal List ExtentList
{
get { return extentList; }
}
private List flattenedExtentList;
internal List FlattenedExtentList
{
get
{
if (null == flattenedExtentList)
{
flattenedExtentList = new List();
}
return flattenedExtentList;
}
set { flattenedExtentList = value; }
}
private Dictionary nameToExtent;
internal Dictionary NameToExtent
{
get { return nameToExtent; }
}
private bool isNestedJoin;
internal bool IsNestedJoin
{
get { return isNestedJoin; }
set { isNestedJoin = value; }
}
public JoinSymbol(string name, TypeUsage type, List extents)
: base(name, type)
{
extentList = new List(extents.Count);
nameToExtent = new Dictionary(extents.Count, StringComparer.OrdinalIgnoreCase);
foreach (Symbol symbol in extents)
{
this.nameToExtent[symbol.Name] = symbol;
this.ExtentList.Add(symbol);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....], [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Data.Metadata.Edm;
using System.Data.Common.CommandTrees;
namespace System.Data.SqlClient.SqlGen
{
///
/// A Join symbol is a special kind of Symbol.
/// It has to carry additional information
///
/// - ColumnList for the list of columns in the select clause if this
/// symbol represents a sql select statement. This is set by
.
/// - ExtentList is the list of extents in the select clause.
/// - FlattenedExtentList - if the Join has multiple extents flattened at the
/// top level, we need this information to ensure that extent aliases are renamed
/// correctly in
/// - NameToExtent has all the extents in ExtentList as a dictionary.
/// This is used by
to flatten
/// record accesses.
/// - IsNestedJoin - is used to determine whether a JoinSymbol is an
/// ordinary join symbol, or one that has a corresponding SqlSelectStatement.
///
///
/// All the lists are set exactly once, and then used for lookups/enumerated.
///
internal sealed class JoinSymbol : Symbol
{
private List columnList;
internal List ColumnList
{
get
{
if (null == columnList)
{
columnList = new List();
}
return columnList;
}
set { columnList = value; }
}
private List extentList;
internal List ExtentList
{
get { return extentList; }
}
private List flattenedExtentList;
internal List FlattenedExtentList
{
get
{
if (null == flattenedExtentList)
{
flattenedExtentList = new List();
}
return flattenedExtentList;
}
set { flattenedExtentList = value; }
}
private Dictionary nameToExtent;
internal Dictionary NameToExtent
{
get { return nameToExtent; }
}
private bool isNestedJoin;
internal bool IsNestedJoin
{
get { return isNestedJoin; }
set { isNestedJoin = value; }
}
public JoinSymbol(string name, TypeUsage type, List extents)
: base(name, type)
{
extentList = new List(extents.Count);
nameToExtent = new Dictionary(extents.Count, StringComparer.OrdinalIgnoreCase);
foreach (Symbol symbol in extents)
{
this.nameToExtent[symbol.Name] = symbol;
this.ExtentList.Add(symbol);
}
}
}
}
// 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
- MemberListBinding.cs
- DetailsViewRowCollection.cs
- ReturnValue.cs
- PersonalizableTypeEntry.cs
- MonthChangedEventArgs.cs
- MergeFilterQuery.cs
- TreeNode.cs
- ProcessThread.cs
- ExpressionVisitor.cs
- sortedlist.cs
- SqlHelper.cs
- InheritanceAttribute.cs
- Clock.cs
- SoapExtensionImporter.cs
- TraceSection.cs
- PathNode.cs
- CodeNamespaceImport.cs
- hresults.cs
- SerializationInfoEnumerator.cs
- ZoneLinkButton.cs
- ProfileEventArgs.cs
- OdbcInfoMessageEvent.cs
- HttpAsyncResult.cs
- LoadedOrUnloadedOperation.cs
- ConfigurationValidatorAttribute.cs
- XhtmlTextWriter.cs
- DataTableCollection.cs
- InternalRelationshipCollection.cs
- LocalizedNameDescriptionPair.cs
- ProfileInfo.cs
- Compress.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- MatrixStack.cs
- SrgsElementFactoryCompiler.cs
- PrivilegeNotHeldException.cs
- DragDeltaEventArgs.cs
- BypassElement.cs
- SingleAnimation.cs
- TraceShell.cs
- CursorConverter.cs
- Thumb.cs
- MainMenu.cs
- pingexception.cs
- SafeNativeMethods.cs
- FrameworkContentElement.cs
- RegistryKey.cs
- WebPartCatalogAddVerb.cs
- ipaddressinformationcollection.cs
- MiniModule.cs
- DataBindingCollection.cs
- ReliableRequestSessionChannel.cs
- Bits.cs
- ReadWriteObjectLock.cs
- MenuItemStyleCollection.cs
- WebServiceMethodData.cs
- DrawingBrush.cs
- Light.cs
- PartialTrustHelpers.cs
- MailMessage.cs
- PointHitTestParameters.cs
- Camera.cs
- DtdParser.cs
- ExpandCollapseProviderWrapper.cs
- TreeChangeInfo.cs
- EmbossBitmapEffect.cs
- MouseButtonEventArgs.cs
- DateTimeEditor.cs
- SimpleLine.cs
- XmlCountingReader.cs
- RecordManager.cs
- TextRenderingModeValidation.cs
- DWriteFactory.cs
- EmptyStringExpandableObjectConverter.cs
- PieceDirectory.cs
- SpoolingTask.cs
- KnownTypesProvider.cs
- ContextMenuStrip.cs
- tooltip.cs
- RTLAwareMessageBox.cs
- SourceLineInfo.cs
- ChangePassword.cs
- RenderData.cs
- WebPartTracker.cs
- HTTPNotFoundHandler.cs
- BatchParser.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SqlConnectionHelper.cs
- WebPartChrome.cs
- XsltLoader.cs
- RemotingSurrogateSelector.cs
- SQLMembershipProvider.cs
- FixedSOMFixedBlock.cs
- ResourceAttributes.cs
- CallbackValidator.cs
- Rotation3D.cs
- Random.cs
- BitmapMetadataBlob.cs
- EntityTypeEmitter.cs
- DomainConstraint.cs
- InvalidBodyAccessException.cs