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
- UnsafeNativeMethodsPenimc.cs
- BackStopAuthenticationModule.cs
- AncillaryOps.cs
- ResourcePool.cs
- KeyedCollection.cs
- AgileSafeNativeMemoryHandle.cs
- WebBodyFormatMessageProperty.cs
- WebPartConnectionCollection.cs
- DateTimeConstantAttribute.cs
- SchemaSetCompiler.cs
- HtmlUtf8RawTextWriter.cs
- ControlBuilderAttribute.cs
- AnonymousIdentificationModule.cs
- SqlDelegatedTransaction.cs
- QilLoop.cs
- PropertyGridEditorPart.cs
- RoleService.cs
- ProcessingInstructionAction.cs
- Accessible.cs
- TimestampInformation.cs
- ContextDataSourceContextData.cs
- JsonByteArrayDataContract.cs
- XNameConverter.cs
- ProfessionalColors.cs
- SocketException.cs
- IdentityNotMappedException.cs
- TemplateAction.cs
- CapabilitiesPattern.cs
- C14NUtil.cs
- TagPrefixInfo.cs
- WebPartMovingEventArgs.cs
- AutomationTextAttribute.cs
- ToolbarAUtomationPeer.cs
- Column.cs
- NameValueSectionHandler.cs
- RelatedEnd.cs
- LifetimeMonitor.cs
- WindowsIdentity.cs
- TableAdapterManagerHelper.cs
- HtmlTextArea.cs
- XmlAggregates.cs
- TableLayoutPanel.cs
- XmlSchemaDocumentation.cs
- CommandEventArgs.cs
- mactripleDES.cs
- PageParserFilter.cs
- ExceptionRoutedEventArgs.cs
- BindingValueChangedEventArgs.cs
- SourceSwitch.cs
- Keywords.cs
- HuffmanTree.cs
- TreeNodeStyleCollection.cs
- StreamGeometryContext.cs
- SamlAction.cs
- ColumnCollection.cs
- TextStore.cs
- FlowLayoutPanel.cs
- ToolStripActionList.cs
- FormClosedEvent.cs
- LinqDataSourceHelper.cs
- WsdlImporterElementCollection.cs
- CompoundFileStorageReference.cs
- RightsManagementProvider.cs
- InkSerializer.cs
- SqlDataSourceCache.cs
- RegexCharClass.cs
- SignerInfo.cs
- RecognizedPhrase.cs
- ToolStripContainerActionList.cs
- RecognitionEventArgs.cs
- HtmlInputPassword.cs
- CustomCategoryAttribute.cs
- NativeWindow.cs
- CommentEmitter.cs
- SerializableAttribute.cs
- PeerCollaboration.cs
- WsdlEndpointConversionContext.cs
- NavigationPropertyEmitter.cs
- ValidationErrorCollection.cs
- RIPEMD160.cs
- FontConverter.cs
- DeferrableContentConverter.cs
- PersonalizationProvider.cs
- ProgressBarBrushConverter.cs
- RelatedView.cs
- FilteredDataSetHelper.cs
- PipeSecurity.cs
- ProfileSettingsCollection.cs
- input.cs
- ToggleProviderWrapper.cs
- XamlFxTrace.cs
- ModelPropertyCollectionImpl.cs
- StatusBarPanel.cs
- OperatorExpressions.cs
- HtmlElementEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- WindowsFormsHostPropertyMap.cs
- IntersectQueryOperator.cs
- PeerEndPoint.cs
- MappingModelBuildProvider.cs