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 / 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
- CancellationToken.cs
- PersonalizationProvider.cs
- SqlWriter.cs
- Region.cs
- PerformanceCounterCategory.cs
- SimplePropertyEntry.cs
- DataTableCollection.cs
- FigureParagraph.cs
- ACE.cs
- XsdValidatingReader.cs
- GeneralTransform2DTo3DTo2D.cs
- SpanIndex.cs
- JsonUriDataContract.cs
- GenericTransactionFlowAttribute.cs
- PrivilegedConfigurationManager.cs
- SqlRowUpdatingEvent.cs
- Listbox.cs
- DispatchWrapper.cs
- CodeParameterDeclarationExpression.cs
- PathStreamGeometryContext.cs
- List.cs
- WrappedKeySecurityTokenParameters.cs
- KeyTimeConverter.cs
- NullableBoolConverter.cs
- WindowsScroll.cs
- Point3DConverter.cs
- Sql8ExpressionRewriter.cs
- _HelperAsyncResults.cs
- RepeaterItemEventArgs.cs
- ChangeConflicts.cs
- XmlDataProvider.cs
- ZoneIdentityPermission.cs
- MultipleViewProviderWrapper.cs
- XmlCDATASection.cs
- HyperlinkAutomationPeer.cs
- CodeTypeDelegate.cs
- EncryptedReference.cs
- PropertyManager.cs
- AnnotationHelper.cs
- CrossSiteScriptingValidation.cs
- PrintPreviewGraphics.cs
- TextElement.cs
- _SslSessionsCache.cs
- XmlAttributes.cs
- SafeSystemMetrics.cs
- CellConstant.cs
- ObjectContextServiceProvider.cs
- GeneralTransform3D.cs
- DataGridViewRowHeaderCell.cs
- View.cs
- StylusButton.cs
- XmlWriter.cs
- SafeHandle.cs
- Clause.cs
- IfJoinedCondition.cs
- ModelTypeConverter.cs
- MouseDevice.cs
- Keyboard.cs
- WebRequestModuleElementCollection.cs
- Stacktrace.cs
- SqlCacheDependencySection.cs
- glyphs.cs
- CompilerGeneratedAttribute.cs
- WinFormsUtils.cs
- ParagraphResult.cs
- XmlComplianceUtil.cs
- ImageMetadata.cs
- XmlNamespaceDeclarationsAttribute.cs
- Columns.cs
- KeyEventArgs.cs
- WebScriptServiceHostFactory.cs
- LinkedResourceCollection.cs
- TemplateContentLoader.cs
- RtfToXamlLexer.cs
- IndicCharClassifier.cs
- RolePrincipal.cs
- XmlProcessingInstruction.cs
- SqlDataSourceStatusEventArgs.cs
- EditorPart.cs
- EventMappingSettings.cs
- ConversionContext.cs
- WrappingXamlSchemaContext.cs
- EntitySetDataBindingList.cs
- Point3D.cs
- ListGeneralPage.cs
- TransformedBitmap.cs
- SspiSafeHandles.cs
- RectValueSerializer.cs
- DCSafeHandle.cs
- ProviderIncompatibleException.cs
- SupportsPreviewControlAttribute.cs
- ExtendedPropertyCollection.cs
- TaiwanLunisolarCalendar.cs
- TextUtf8RawTextWriter.cs
- Bidi.cs
- OrderedDictionary.cs
- SectionRecord.cs
- Part.cs
- ComboBoxAutomationPeer.cs
- DataSetUtil.cs