Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Data.Entity / System / Data / Metadata / Edm / AssociationEndMember.cs
blob33511243f7584ba01bee5d40adaafeba1dbf5f11
1 //---------------------------------------------------------------------
2 // <copyright file="AssociationEndMember.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 //
6 // @owner Microsoft
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
10 using System;
11 using System.Collections.Generic;
12 using System.Text;
13 using System.Threading;
14 using System.Data.Objects.DataClasses;
16 namespace System.Data.Metadata.Edm
18 /// <summary>
19 /// Represents a end of a Association Type
20 /// </summary>
21 public sealed class AssociationEndMember : RelationshipEndMember
23 #region Constructors
24 /// <summary>
25 /// Initializes a new instance of AssociationEndMember
26 /// </summary>
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,
31 RefType endRefType,
32 RelationshipMultiplicity multiplicity)
33 : base(name, endRefType, multiplicity)
36 #endregion
38 /// <summary>
39 /// Returns the kind of the type
40 /// </summary>
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; }
49 set
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);