Jaa


EdmToClrConverter.AsClrValue Method

Definition

Overloads

AsClrValue(IEdmValue, Type)

Converts edmValue to a CLR value of the specified type. Supported values for clrType are: CLR primitive types such as String and Int32, CLR enum types, IEnumerable<T>, ICollection<T>, IList<T>, 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; } }.

AsClrValue<T>(IEdmValue)

Converts edmValue to a CLR value of the specified type. Supported values for T are: CLR primitive types such as String and Int32, CLR enum types, IEnumerable<T>, ICollection<T>, IList<T>, 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; } }.

AsClrValue(IEdmValue, Type)

Converts edmValue to a CLR value of the specified type. Supported values for clrType are: CLR primitive types such as String and Int32, CLR enum types, IEnumerable<T>, ICollection<T>, IList<T>, 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; } }.

public object AsClrValue (Microsoft.OData.Edm.Vocabularies.IEdmValue edmValue, Type clrType);
member this.AsClrValue : Microsoft.OData.Edm.Vocabularies.IEdmValue * Type -> obj
Public Function AsClrValue (edmValue As IEdmValue, clrType As Type) As Object

Parameters

edmValue
IEdmValue

The EDM value to be converted.

clrType
Type

The CLR type.

Returns

A CLR value converted from edmValue.

Remarks

This method performs boxing and unboxing for value types. Use value-type specific methods such as Microsoft.OData.Edm.Vocabularies.EdmToClrConverter.AsClrString(Microsoft.OData.Edm.Vocabularies.IEdmValue) to avoid boxing and unboxing.

Applies to

AsClrValue<T>(IEdmValue)

Converts edmValue to a CLR value of the specified type. Supported values for T are: CLR primitive types such as String and Int32, CLR enum types, IEnumerable<T>, ICollection<T>, IList<T>, 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; } }.

public T AsClrValue<T> (Microsoft.OData.Edm.Vocabularies.IEdmValue edmValue);
member this.AsClrValue : Microsoft.OData.Edm.Vocabularies.IEdmValue -> 'T
Public Function AsClrValue(Of T) (edmValue As IEdmValue) As T

Type Parameters

T

The CLR type.

Parameters

edmValue
IEdmValue

The EDM value to be converted.

Returns

T

A CLR value converted from edmValue.

Remarks

This method performs boxing and unboxing for value types. Use value-type specific methods such as Microsoft.OData.Edm.Vocabularies.EdmToClrConverter.AsClrString(Microsoft.OData.Edm.Vocabularies.IEdmValue) to avoid boxing and unboxing.

Applies to