Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Metadata / Edm / NavigationProperty.cs / 2 / 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
- SspiHelper.cs
- QueryContinueDragEventArgs.cs
- TraceListeners.cs
- ConvertTextFrag.cs
- Attributes.cs
- MetadataHelper.cs
- MarginsConverter.cs
- EntityTypeBase.cs
- ObjectNavigationPropertyMapping.cs
- UnsafeNativeMethodsCLR.cs
- _ConnectStream.cs
- X509Utils.cs
- TraceEventCache.cs
- RelationshipWrapper.cs
- RegisteredScript.cs
- ExtensibleClassFactory.cs
- OleDbEnumerator.cs
- AsyncCallback.cs
- XmlAttributeProperties.cs
- RightNameExpirationInfoPair.cs
- FontClient.cs
- GeneralTransform2DTo3DTo2D.cs
- GetPageNumberCompletedEventArgs.cs
- XmlAnyElementAttribute.cs
- EditingCommands.cs
- StringResourceManager.cs
- IdnMapping.cs
- HMACSHA384.cs
- RequestQueue.cs
- WebEventCodes.cs
- CellLabel.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- NavigationPropertyEmitter.cs
- CallbackHandler.cs
- MasterPageParser.cs
- QilPatternVisitor.cs
- TransactedBatchingBehavior.cs
- _DigestClient.cs
- InitializeCorrelation.cs
- ContourSegment.cs
- X509Certificate.cs
- CustomError.cs
- NamespaceList.cs
- PlatformCulture.cs
- filewebrequest.cs
- ServiceParser.cs
- IntSecurity.cs
- GenericPrincipal.cs
- HtmlTable.cs
- StyleCollection.cs
- AuthenticationModulesSection.cs
- EntityCodeGenerator.cs
- DecoderExceptionFallback.cs
- PropertyDescriptorCollection.cs
- DataTemplateKey.cs
- DateTimeFormat.cs
- UpdateTracker.cs
- InstanceOwnerQueryResult.cs
- ConstantExpression.cs
- MarshalByValueComponent.cs
- EventDescriptor.cs
- FixedDSBuilder.cs
- MDIWindowDialog.cs
- RoleService.cs
- FreeFormDragDropManager.cs
- SettingsBase.cs
- HtmlTernaryTree.cs
- CodeAccessSecurityEngine.cs
- JoinElimination.cs
- HierarchicalDataSourceIDConverter.cs
- BackgroundFormatInfo.cs
- Pts.cs
- MenuItemBinding.cs
- CacheForPrimitiveTypes.cs
- SimpleBitVector32.cs
- ResourceDescriptionAttribute.cs
- RuleEngine.cs
- SetterBaseCollection.cs
- SearchForVirtualItemEventArgs.cs
- HistoryEventArgs.cs
- CacheSection.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- OleDbStruct.cs
- ContentOperations.cs
- NumericExpr.cs
- MeasureData.cs
- TextShapeableCharacters.cs
- LicenseProviderAttribute.cs
- XamlFilter.cs
- ContainerControl.cs
- ClrPerspective.cs
- PrintPreviewControl.cs
- smtppermission.cs
- RowType.cs
- IpcManager.cs
- TdsParserSessionPool.cs
- ServiceElementCollection.cs
- Oci.cs
- DoubleAnimationUsingPath.cs
- GridViewRowCollection.cs