CustomReflectionContext.CreateProperty Método

Definición

Crea un objeto que representa una propiedad que se va a agregar a un tipo, tal y como especifica el AddProperties(Type) método .

Sobrecargas

Nombre Description
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)

Crea un objeto que representa una propiedad que se va a agregar a un tipo, que se usará con el AddProperties(Type) método .

CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>)

Crea un objeto que representa una propiedad que se va a agregar a un tipo, que se va a usar con el AddProperties(Type) método y utilizando los atributos personalizados especificados.

CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)

Crea un objeto que representa una propiedad que se va a agregar a un tipo, que se usará con el AddProperties(Type) método .

protected:
 System::Reflection::PropertyInfo ^ CreateProperty(Type ^ propertyType, System::String ^ name, Func<System::Object ^, System::Object ^> ^ getter, Action<System::Object ^, System::Object ^> ^ setter);
protected System.Reflection.PropertyInfo CreateProperty(Type propertyType, string name, Func<object,object> getter, Action<object,object> setter);
member this.CreateProperty : Type * string * Func<obj, obj> * Action<obj, obj> -> System.Reflection.PropertyInfo
Protected Function CreateProperty (propertyType As Type, name As String, getter As Func(Of Object, Object), setter As Action(Of Object, Object)) As PropertyInfo

Parámetros

propertyType
Type

Tipo de la propiedad que se va a crear.

name
String

Nombre de la propiedad que se va a crear.

getter
Func<Object,Object>

Objeto que representa el descriptor de acceso de get la propiedad.

setter
Action<Object,Object>

Objeto que representa el descriptor de acceso de set la propiedad.

Devoluciones

Objeto que representa la propiedad .

Comentarios

Los objetos devueltos por este método no son objetos completos PropertyInfo y solo se deben usar en el contexto del AddProperties método .

Se aplica a

CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>)

Crea un objeto que representa una propiedad que se va a agregar a un tipo, que se va a usar con el AddProperties(Type) método y utilizando los atributos personalizados especificados.

protected:
 System::Reflection::PropertyInfo ^ CreateProperty(Type ^ propertyType, System::String ^ name, Func<System::Object ^, System::Object ^> ^ getter, Action<System::Object ^, System::Object ^> ^ setter, System::Collections::Generic::IEnumerable<Attribute ^> ^ propertyCustomAttributes, System::Collections::Generic::IEnumerable<Attribute ^> ^ getterCustomAttributes, System::Collections::Generic::IEnumerable<Attribute ^> ^ setterCustomAttributes);
protected System.Reflection.PropertyInfo CreateProperty(Type propertyType, string name, Func<object,object> getter, Action<object,object> setter, System.Collections.Generic.IEnumerable<Attribute> propertyCustomAttributes, System.Collections.Generic.IEnumerable<Attribute> getterCustomAttributes, System.Collections.Generic.IEnumerable<Attribute> setterCustomAttributes);
member this.CreateProperty : Type * string * Func<obj, obj> * Action<obj, obj> * seq<Attribute> * seq<Attribute> * seq<Attribute> -> System.Reflection.PropertyInfo
Protected Function CreateProperty (propertyType As Type, name As String, getter As Func(Of Object, Object), setter As Action(Of Object, Object), propertyCustomAttributes As IEnumerable(Of Attribute), getterCustomAttributes As IEnumerable(Of Attribute), setterCustomAttributes As IEnumerable(Of Attribute)) As PropertyInfo

Parámetros

propertyType
Type

Tipo de la propiedad que se va a crear.

name
String

Nombre de la propiedad que se va a crear.

getter
Func<Object,Object>

Objeto que representa el descriptor de acceso de get la propiedad.

setter
Action<Object,Object>

Objeto que representa el descriptor de acceso de set la propiedad.

propertyCustomAttributes
IEnumerable<Attribute>

Colección de atributos personalizados que se van a aplicar a la propiedad .

getterCustomAttributes
IEnumerable<Attribute>

Colección de atributos personalizados que se aplicarán al descriptor de acceso de get la propiedad.

setterCustomAttributes
IEnumerable<Attribute>

Colección de atributos personalizados que se aplicarán al descriptor de acceso de set la propiedad.

Devoluciones

Objeto que representa la propiedad .

Comentarios

Los objetos devueltos por este método no son objetos completos PropertyInfo y solo se deben usar en el contexto del AddProperties método .

Se aplica a