CustomReflectionContext.CreateProperty Método

Definição

Cria um objeto que representa uma propriedade a ser adicionada a um tipo, conforme especificado pelo AddProperties(Type) método.

Sobrecargas

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

Cria um objeto que representa uma propriedade a ser adicionada a um tipo, para ser usada com o AddProperties(Type) método.

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

Cria um objeto que representa uma propriedade a ser adicionada a um tipo, para ser usada com o AddProperties(Type) método e usando os atributos personalizados especificados.

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

Cria um objeto que representa uma propriedade a ser adicionada a um tipo, para ser usada com o 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

O tipo de propriedade a criar.

name
String

O nome da propriedade a criar.

getter
Func<Object,Object>

Um objeto que representa o acessório da get propriedade.

setter
Action<Object,Object>

Um objeto que representa o acessório da set propriedade.

Devoluções

Um objeto que representa a propriedade.

Observações

Os objetos que são devolvidos por este método não são objetos completos PropertyInfo , e devem ser usados apenas no contexto do AddProperties método.

Aplica-se a

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

Cria um objeto que representa uma propriedade a ser adicionada a um tipo, para ser usada com o AddProperties(Type) método e usando os 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

O tipo de propriedade a criar.

name
String

O nome da propriedade a criar.

getter
Func<Object,Object>

Um objeto que representa o acessório da get propriedade.

setter
Action<Object,Object>

Um objeto que representa o acessório da set propriedade.

propertyCustomAttributes
IEnumerable<Attribute>

Um conjunto de atributos personalizados para aplicar à propriedade.

getterCustomAttributes
IEnumerable<Attribute>

Uma coleção de atributos personalizados para aplicar ao acessório da get propriedade.

setterCustomAttributes
IEnumerable<Attribute>

Uma coleção de atributos personalizados para aplicar ao acessório da set propriedade.

Devoluções

Um objeto que representa a propriedade.

Observações

Os objetos que são devolvidos por este método não são objetos completos PropertyInfo , e devem ser usados apenas no contexto do AddProperties método.

Aplica-se a