Compartir a través de


EdmToClrConverter.AsClrValue Método

Definición

Sobrecargas

AsClrValue(IEdmValue, Type)

edmValue Convierte en un valor CLR del tipo especificado. Los valores admitidos para clrType son: tipos primitivos CLR, como String y Int32, tipos de enumeración CLR, IEnumerable<T>, ICollection<T>, , IList<T>clases CLR con constructores predeterminados y propiedades públicas con establecedores y propiedades de colección de las formas siguientes: 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)

edmValue Convierte en un valor CLR del tipo especificado. Los valores admitidos para T son: tipos primitivos CLR, como String y Int32, tipos de enumeración CLR, IEnumerable<T>, ICollection<T>, , IList<T>clases CLR con constructores predeterminados y propiedades públicas con establecedores y propiedades de colección de las formas siguientes: 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)

edmValue Convierte en un valor CLR del tipo especificado. Los valores admitidos para clrType son: tipos primitivos CLR, como String y Int32, tipos de enumeración CLR, IEnumerable<T>, ICollection<T>, , IList<T>clases CLR con constructores predeterminados y propiedades públicas con establecedores y propiedades de colección de las formas siguientes: 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

Parámetros

edmValue
IEdmValue

Valor EDM que se va a convertir.

clrType
Type

Tipo CLR.

Devoluciones

Valor CLR convertido de edmValue.

Comentarios

Este método realiza la conversión boxing y la conversión unboxing para tipos de valor. Use métodos específicos de tipo de valor como Microsoft.OData.Edm.Vocabularies.EdmToClrConverter.AsClrString(Microsoft.OData.Edm.Vocabularies.IEdmValue) para evitar la conversión boxing y unboxing.

Se aplica a

AsClrValue<T>(IEdmValue)

edmValue Convierte en un valor CLR del tipo especificado. Los valores admitidos para T son: tipos primitivos CLR, como String y Int32, tipos de enumeración CLR, IEnumerable<T>, ICollection<T>, , IList<T>clases CLR con constructores predeterminados y propiedades públicas con establecedores y propiedades de colección de las formas siguientes: 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

Parámetros de tipo

T

Tipo CLR.

Parámetros

edmValue
IEdmValue

Valor EDM que se va a convertir.

Devoluciones

T

Valor CLR convertido de edmValue.

Comentarios

Este método realiza la conversión boxing y la conversión unboxing para tipos de valor. Use métodos específicos de tipo de valor como Microsoft.OData.Edm.Vocabularies.EdmToClrConverter.AsClrString(Microsoft.OData.Edm.Vocabularies.IEdmValue) para evitar la conversión boxing y unboxing.

Se aplica a