EdmToClrConverter.AsClrValue<T> Method (IEdmValue)
Converts edmValue to a CLR value of the specified type.
Namespace: Microsoft.Data.Edm.EdmToClrConversion
Assembly: Microsoft.Data.Edm (in Microsoft.Data.Edm.dll)
Syntax
'Declaration
Public Function AsClrValue(Of T) ( _
edmValue As IEdmValue _
) As T
'Usage
Dim instance As EdmToClrConverter
Dim edmValue As IEdmValue
Dim returnValue As T
returnValue = instance.AsClrValue(edmValue)
public T AsClrValue<T>(
IEdmValue edmValue
)
public:
generic<typename T>
T AsClrValue(
IEdmValue^ edmValue
)
member AsClrValue :
edmValue:IEdmValue -> 'T
JScript does not support generic types and methods.
Type Parameters
- T
The CLR type.
Parameters
- edmValue
Type: Microsoft.Data.Edm.Values.IEdmValue
The EDM value to be converted.
Return Value
Type: T
A CLR value of the specified type.
Remarks
Supported values for T are:
CLR enum types.
CLR classes with default constructors and public properties with setters and collection properties of the following shapes:
IEnumerable<T>EnumerableProperty { get; set; }
ICollection<T>CollectionProperty { get; set; }
IList<T>ListProperty { get; set; }
ICollection<T>CollectionProperty { get { return this.nonNullCollection; } }
IList<T>ListProperty { get { return this.nonNullList; } }
This method performs boxing and unboxing for value types. Use value-type specific methods such as AsClrString(IEdmValue) to avoid boxing and unboxing.