1 //---------------------------------------------------------------------
2 // <copyright file="AssociationEndMember.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
11 using System
.Collections
.Generic
;
13 using System
.Threading
;
14 using System
.Data
.Objects
.DataClasses
;
16 namespace System
.Data
.Metadata
.Edm
19 /// Represents a end of a Association Type
21 public sealed class AssociationEndMember
: RelationshipEndMember
25 /// Initializes a new instance of AssociationEndMember
27 /// <param name="name">name of the association end member</param>
28 /// <param name="endRefType">Ref type that this end refers to </param>
29 /// <param name="multiplicity">multiplicity of the end</param>
30 internal AssociationEndMember(string name
,
32 RelationshipMultiplicity multiplicity
)
33 : base(name
, endRefType
, multiplicity
)
39 /// Returns the kind of the type
41 public override BuiltInTypeKind BuiltInTypeKind { get { return BuiltInTypeKind.AssociationEndMember; }
}
43 private Func
<RelationshipManager
, RelatedEnd
, RelatedEnd
> _getRelatedEndMethod
= null;
45 /// <summary>cached dynamic method to set a CLR property value on a CLR instance</summary>
46 internal Func
<RelationshipManager
, RelatedEnd
, RelatedEnd
> GetRelatedEnd
48 get { return _getRelatedEndMethod; }
51 System
.Diagnostics
.Debug
.Assert(null != value, "clearing GetRelatedEndMethod");
52 // It doesn't matter which delegate wins, but only one should be jitted
53 Interlocked
.CompareExchange(ref _getRelatedEndMethod
, value, null);