CustomReflectionContext.CreateProperty Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
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.
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.
- 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.