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 / 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
- HostedBindingBehavior.cs
- BaseParaClient.cs
- ContentElementAutomationPeer.cs
- Rect3D.cs
- OTFRasterizer.cs
- MessageQueueKey.cs
- RenderDataDrawingContext.cs
- EmptyControlCollection.cs
- ViewStateException.cs
- ButtonFieldBase.cs
- DoubleLink.cs
- TraceData.cs
- ExpressionEditorAttribute.cs
- SystemKeyConverter.cs
- DataTableMappingCollection.cs
- SqlMethodAttribute.cs
- Compiler.cs
- CultureInfo.cs
- Positioning.cs
- ResolveNameEventArgs.cs
- BindingContext.cs
- VisualBasicReference.cs
- XsltArgumentList.cs
- CodeTypeReference.cs
- ButtonAutomationPeer.cs
- ISFTagAndGuidCache.cs
- SchemaDeclBase.cs
- AppDomainShutdownMonitor.cs
- StartFileNameEditor.cs
- HtmlInputText.cs
- TraceSource.cs
- ScrollProperties.cs
- ServiceHostingEnvironmentSection.cs
- FontStyleConverter.cs
- DataGridSortCommandEventArgs.cs
- TabletDevice.cs
- GcSettings.cs
- DataBindingList.cs
- DragDrop.cs
- ServiceDescriptionContext.cs
- MetafileHeaderWmf.cs
- ResXResourceWriter.cs
- DataPointer.cs
- KeyedCollection.cs
- LinkButton.cs
- ConversionContext.cs
- TypeForwardedToAttribute.cs
- EventTrigger.cs
- DbReferenceCollection.cs
- SqlUserDefinedTypeAttribute.cs
- FileStream.cs
- OrderByQueryOptionExpression.cs
- SourceItem.cs
- RewritingValidator.cs
- PreviewPageInfo.cs
- Bits.cs
- DriveNotFoundException.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- AlphabeticalEnumConverter.cs
- DiscoveryDocumentLinksPattern.cs
- UIElementIsland.cs
- SettingsAttributeDictionary.cs
- ConfigurationLocation.cs
- SequentialOutput.cs
- MbpInfo.cs
- ImageAttributes.cs
- FontFamilyIdentifier.cs
- ContextProperty.cs
- XamlParser.cs
- Guid.cs
- IndicCharClassifier.cs
- ControlPaint.cs
- NativeObjectSecurity.cs
- SafeSecurityHandles.cs
- ResolveNameEventArgs.cs
- TraceContext.cs
- SoapExtensionTypeElementCollection.cs
- ResourceDescriptionAttribute.cs
- WebConfigurationHost.cs
- HttpCacheParams.cs
- OracleParameterCollection.cs
- TaiwanLunisolarCalendar.cs
- ColumnPropertiesGroup.cs
- ServerValidateEventArgs.cs
- ConfigXmlWhitespace.cs
- Single.cs
- EventWaitHandle.cs
- AuthenticationService.cs
- BaseCAMarshaler.cs
- SharedConnectionListener.cs
- ImageSourceValueSerializer.cs
- MaterialGroup.cs
- RevocationPoint.cs
- ReadonlyMessageFilter.cs
- Constants.cs
- StylusDownEventArgs.cs
- HelpProvider.cs
- CodeMemberMethod.cs
- RemoveStoryboard.cs
- WebSysDescriptionAttribute.cs