Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / Structures / ExtentJoinTreeNode.cs / 1 / ExtentJoinTreeNode.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Data.Metadata.Edm;
using System.Collections.Generic;
using System.Diagnostics;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.Structures {
// A JoinTreeNode that represents an association set or an entity set
internal class ExtentJoinTreeNode : JoinTreeNode {
// effects: Creates a join tree node for "extent" and no children
internal ExtentJoinTreeNode(EntitySetBase extent, IEnumerable children, MetadataWorkspace workspace) :
base(false /* isOptional */, children, workspace) {
m_extent = extent;
}
#region Fields
private EntitySetBase m_extent;
#endregion
#region Properties
internal override EdmType NodeType {
get { return m_extent.ElementType;}
}
internal EntitySetBase Extent {
get { return m_extent; }
}
protected override string ContextName {
get { return m_extent.Name;}
}
#endregion
#region Methods
// effects: Determines all the identifiers used in this and adds them to identifiers
internal override void GetIdentifiers(CqlIdentifiers identifiers) {
identifiers.AddIdentifier(m_extent.Name);
identifiers.AddIdentifier(m_extent.ElementType.Name);
}
protected override bool IsSameContext(JoinTreeNode second) {
ExtentJoinTreeNode extentNode = second as ExtentJoinTreeNode;
return extentNode != null && Extent.Equals(extentNode.Extent);
}
protected override JoinTreeNode CreateNodeFromContext(bool nodeIsOptional,
List children) {
Debug.Assert(nodeIsOptional == false);
return new ExtentJoinTreeNode(Extent, children, this.MetadataWorkspace);
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Data.Metadata.Edm;
using System.Collections.Generic;
using System.Diagnostics;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.Structures {
// A JoinTreeNode that represents an association set or an entity set
internal class ExtentJoinTreeNode : JoinTreeNode {
// effects: Creates a join tree node for "extent" and no children
internal ExtentJoinTreeNode(EntitySetBase extent, IEnumerable children, MetadataWorkspace workspace) :
base(false /* isOptional */, children, workspace) {
m_extent = extent;
}
#region Fields
private EntitySetBase m_extent;
#endregion
#region Properties
internal override EdmType NodeType {
get { return m_extent.ElementType;}
}
internal EntitySetBase Extent {
get { return m_extent; }
}
protected override string ContextName {
get { return m_extent.Name;}
}
#endregion
#region Methods
// effects: Determines all the identifiers used in this and adds them to identifiers
internal override void GetIdentifiers(CqlIdentifiers identifiers) {
identifiers.AddIdentifier(m_extent.Name);
identifiers.AddIdentifier(m_extent.ElementType.Name);
}
protected override bool IsSameContext(JoinTreeNode second) {
ExtentJoinTreeNode extentNode = second as ExtentJoinTreeNode;
return extentNode != null && Extent.Equals(extentNode.Extent);
}
protected override JoinTreeNode CreateNodeFromContext(bool nodeIsOptional,
List children) {
Debug.Assert(nodeIsOptional == false);
return new ExtentJoinTreeNode(Extent, children, this.MetadataWorkspace);
}
#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
- ArrangedElement.cs
- KeyBinding.cs
- ClickablePoint.cs
- StreamUpdate.cs
- EntityContainer.cs
- CapacityStreamGeometryContext.cs
- Lookup.cs
- CodeGotoStatement.cs
- ReachDocumentReferenceSerializer.cs
- SqlFacetAttribute.cs
- Update.cs
- CompositeTypefaceMetrics.cs
- SqlRowUpdatedEvent.cs
- RadialGradientBrush.cs
- AspProxy.cs
- MsmqHostedTransportConfiguration.cs
- RootBuilder.cs
- COM2PropertyDescriptor.cs
- PageRanges.cs
- ReadOnlyObservableCollection.cs
- DataGridRowsPresenter.cs
- SoapObjectReader.cs
- OleDbMetaDataFactory.cs
- ImageCollectionCodeDomSerializer.cs
- NavigationProgressEventArgs.cs
- FlowDocumentPaginator.cs
- UserPreferenceChangedEventArgs.cs
- Point3D.cs
- AddInControllerImpl.cs
- MaskDescriptor.cs
- MetadataArtifactLoaderCompositeFile.cs
- SqlGatherProducedAliases.cs
- StorageEntitySetMapping.cs
- PresentationSource.cs
- StringCollection.cs
- CompModSwitches.cs
- WebPartCatalogAddVerb.cs
- FontStretchConverter.cs
- ExtensibleClassFactory.cs
- InvalidOleVariantTypeException.cs
- SendReply.cs
- GridViewCancelEditEventArgs.cs
- BindingMemberInfo.cs
- WebBrowserDocumentCompletedEventHandler.cs
- CodeSnippetExpression.cs
- ValidateNames.cs
- TcpTransportElement.cs
- DataGridViewCellParsingEventArgs.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ProfileSettingsCollection.cs
- ConfigsHelper.cs
- SocketInformation.cs
- XPathNodeIterator.cs
- TextRange.cs
- RepeatButtonAutomationPeer.cs
- IntSecurity.cs
- CngKey.cs
- newinstructionaction.cs
- OdbcCommandBuilder.cs
- RegexCompiler.cs
- ConfigurationSectionGroup.cs
- DynamicRendererThreadManager.cs
- BaseComponentEditor.cs
- UnaryNode.cs
- PrintPreviewDialog.cs
- CommonObjectSecurity.cs
- Int16Storage.cs
- Int16AnimationBase.cs
- XmlSchemaIdentityConstraint.cs
- StylusShape.cs
- EncoderReplacementFallback.cs
- ToolStripArrowRenderEventArgs.cs
- AddDataControlFieldDialog.cs
- ManagementClass.cs
- unsafenativemethodstextservices.cs
- AppSettingsExpressionBuilder.cs
- ApplicationTrust.cs
- BindingObserver.cs
- TimersDescriptionAttribute.cs
- OrderedEnumerableRowCollection.cs
- DependencySource.cs
- RectAnimationClockResource.cs
- BrushConverter.cs
- MachineKeySection.cs
- DependencyProperty.cs
- ArrayList.cs
- WebPageTraceListener.cs
- ConfigurationSection.cs
- DefaultIfEmptyQueryOperator.cs
- CodeVariableDeclarationStatement.cs
- TypeUsageBuilder.cs
- WSHttpBindingElement.cs
- ECDiffieHellmanCng.cs
- NumericUpDown.cs
- SplineQuaternionKeyFrame.cs
- ToolStripPanelRenderEventArgs.cs
- Utilities.cs
- BinaryMessageEncoder.cs
- JobDuplex.cs
- X509Logo.cs