CustomReflectionContext.CreateProperty Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo, come specificato dal AddProperties(Type) metodo .
Overload
| Nome | Descrizione |
|---|---|
| CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>) |
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo da utilizzare con il AddProperties(Type) metodo . |
| CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>) |
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo, da utilizzare con il AddProperties(Type) metodo e utilizzando gli attributi personalizzati specificati. |
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo da utilizzare con il AddProperties(Type) metodo .
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
Parametri
- propertyType
- Type
Tipo della proprietà da creare.
- name
- String
Nome della proprietà da creare.
Valori restituiti
Oggetto che rappresenta la proprietà .
Commenti
Gli oggetti restituiti da questo metodo non sono oggetti completi PropertyInfo e devono essere utilizzati solo nel contesto del AddProperties metodo .
Si applica a
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>)
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo, da utilizzare con il AddProperties(Type) metodo e utilizzando gli attributi personalizzati specificati.
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
Parametri
- propertyType
- Type
Tipo della proprietà da creare.
- name
- String
Nome della proprietà da creare.
- propertyCustomAttributes
- IEnumerable<Attribute>
Insieme di attributi personalizzati da applicare alla proprietà .
- getterCustomAttributes
- IEnumerable<Attribute>
Insieme di attributi personalizzati da applicare alla funzione di accesso della get proprietà.
- setterCustomAttributes
- IEnumerable<Attribute>
Insieme di attributi personalizzati da applicare alla funzione di accesso della set proprietà.
Valori restituiti
Oggetto che rappresenta la proprietà .
Commenti
Gli oggetti restituiti da questo metodo non sono oggetti completi PropertyInfo e devono essere utilizzati solo nel contesto del AddProperties metodo .