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 / Metadata / Edm / NavigationProperty.cs / 1 / NavigationProperty.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....], [....]
//---------------------------------------------------------------------
using System.Collections.Generic;
using System.Data.Common;
using System.Diagnostics;
using System.Threading;
namespace System.Data.Metadata.Edm
{
///
/// Represent the edm navigation property class
///
public sealed class NavigationProperty : EdmMember
{
#region Constructors
///
/// Initializes a new instance of the navigation property class
///
/// name of the navigation property
/// TypeUsage object containing the navigation property type and its facets
/// Thrown if name or typeUsage arguments are null
/// Thrown if name argument is empty string
internal NavigationProperty(string name, TypeUsage typeUsage)
: base(name, typeUsage)
{
EntityUtil.CheckStringArgument(name, "name");
EntityUtil.GenericCheckArgumentNull(typeUsage, "typeUsage");
}
///
/// Initializes a new OSpace instance of the property class
///
/// name of the property
/// TypeUsage object containing the property type and its facets
/// for the property
internal NavigationProperty(string name, TypeUsage typeUsage, System.Reflection.PropertyInfo propertyInfo)
: this(name, typeUsage)
{
System.Diagnostics.Debug.Assert(name == propertyInfo.Name, "different PropertyName?");
if (null != propertyInfo)
{
System.Reflection.MethodInfo method;
method = propertyInfo.GetGetMethod();
PropertyGetterHandle = ((null != method) ? method.MethodHandle : default(System.RuntimeMethodHandle));
}
}
#endregion
///
/// Returns the kind of the type
///
public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.NavigationProperty; } }
#region Fields
internal const string RelationshipTypeNamePropertyName = "RelationshipType";
internal const string ToEndMemberNamePropertyName = "ToEndMember";
private RelationshipType _relationshipType;
private RelationshipEndMember _toEndMember;
private RelationshipEndMember _fromEndMember;
/// Store the handle, allowing the PropertyInfo/MethodInfo/Type references to be GC'd
internal readonly System.RuntimeMethodHandle PropertyGetterHandle;
/// cached dynamic method to get the property value from a CLR instance
private Func
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MemoryMappedViewStream.cs
- ActivityExecutionFilter.cs
- HttpCacheVaryByContentEncodings.cs
- PropertyGridCommands.cs
- Label.cs
- AuthorizationRule.cs
- ViewDesigner.cs
- CharAnimationUsingKeyFrames.cs
- Stylesheet.cs
- ConfigXmlElement.cs
- BitmapEffectRenderDataResource.cs
- Binding.cs
- SQLDateTimeStorage.cs
- CollectionViewGroupInternal.cs
- TCPClient.cs
- hwndwrapper.cs
- SmiEventSink_Default.cs
- Processor.cs
- SchemaMapping.cs
- Metadata.cs
- WebException.cs
- SecUtil.cs
- DbParameterCollectionHelper.cs
- log.cs
- unitconverter.cs
- AliasGenerator.cs
- DefaultBindingPropertyAttribute.cs
- GlyphRun.cs
- HttpContext.cs
- Cursors.cs
- _ChunkParse.cs
- PowerModeChangedEventArgs.cs
- SQLSingle.cs
- StatusInfoItem.cs
- XmlNamedNodeMap.cs
- ColumnWidthChangedEvent.cs
- BuildProvider.cs
- LogRestartAreaEnumerator.cs
- CheckBoxList.cs
- ReferenceEqualityComparer.cs
- CustomSignedXml.cs
- cookiecollection.cs
- HtmlElementEventArgs.cs
- XmlRootAttribute.cs
- SystemDropShadowChrome.cs
- Point4DConverter.cs
- sqlstateclientmanager.cs
- IBuiltInEvidence.cs
- DesignerWithHeader.cs
- CodeIdentifiers.cs
- COM2ColorConverter.cs
- GetFileNameResult.cs
- HeaderedContentControl.cs
- FeatureSupport.cs
- ScrollChangedEventArgs.cs
- HelpFileFileNameEditor.cs
- TreeNodeBinding.cs
- AutomationPatternInfo.cs
- UInt64Converter.cs
- StorageFunctionMapping.cs
- SoapIncludeAttribute.cs
- HashMembershipCondition.cs
- ProviderUtil.cs
- NavigationProperty.cs
- TextParaClient.cs
- SymmetricCryptoHandle.cs
- BitArray.cs
- ImageButton.cs
- RelationshipFixer.cs
- ButtonFlatAdapter.cs
- CompilerError.cs
- UInt64Converter.cs
- ApplicationFileParser.cs
- TextBox.cs
- Rect3D.cs
- DeferredTextReference.cs
- Geometry.cs
- ScalarConstant.cs
- XmlIlVisitor.cs
- RuleProcessor.cs
- XmlUTF8TextWriter.cs
- WindowsFormsHostPropertyMap.cs
- OverrideMode.cs
- ActivityWithResultValueSerializer.cs
- StateFinalizationDesigner.cs
- SqlDependency.cs
- SessionState.cs
- EventlogProvider.cs
- QueryOutputWriterV1.cs
- SendKeys.cs
- MaskedTextProvider.cs
- AuthenticationModuleElementCollection.cs
- TagElement.cs
- MissingMethodException.cs
- BaseCodeDomTreeGenerator.cs
- ConfigurationProperty.cs
- TagPrefixAttribute.cs
- ListBoxItem.cs
- HttpDictionary.cs
- XmlText.cs