//---------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner Microsoft
// @backupOwner Microsoft
//---------------------------------------------------------------------
using System.Data.Common;
using System.Threading;
namespace System.Data.Metadata.Edm
{
///
/// Represent the edm property class
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Edm")]
public sealed class EdmProperty : EdmMember
{
#region Constructors
///
/// Initializes a new instance of the property class
///
/// name of the property
/// TypeUsage object containing the property type and its facets
/// Thrown if name or typeUsage arguments are null
/// Thrown if name argument is empty string
internal EdmProperty(string name, TypeUsage typeUsage)
: base(name, typeUsage)
{
EntityUtil.CheckStringArgument(name, "name");
EntityUtil.GenericCheckArgumentNull(typeUsage, "typeUsage");
}
#endregion
#region Fields
/// Store the handle, allowing the PropertyInfo/MethodInfo/Type references to be GC'd
internal readonly System.RuntimeMethodHandle PropertyGetterHandle;
/// Store the handle, allowing the PropertyInfo/MethodInfo/Type references to be GC'd
internal readonly System.RuntimeMethodHandle PropertySetterHandle;
/// Store the handle, allowing the PropertyInfo/MethodInfo/Type references to be GC'd
internal readonly System.RuntimeTypeHandle EntityDeclaringType;
/// cached dynamic method to get the property value from a CLR instance
private Func