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 metodo AddProperties(Type).
Overload
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 metodo AddProperties(Type). |
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 metodo AddProperties(Type) e utilizzando gli attributi personalizzati specificati. |
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo, da utilizzare con il metodo AddProperties(Type).
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);
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 di proprietà da creare.
- name
- String
Nome della proprietà da creare.
Restituisce
Oggetto che rappresenta la proprietà.
Commenti
Gli oggetti restituiti da questo metodo non sono oggetti completi PropertyInfo e devono essere usati solo nel contesto del AddProperties metodo.
Si applica a
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>)
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
- Origine:
- CustomReflectionContext.cs
Crea un oggetto che rappresenta una proprietà da aggiungere a un tipo, da utilizzare con il metodo AddProperties(Type) 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);
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 di proprietà da creare.
- name
- String
Nome della proprietà da creare.
- propertyCustomAttributes
- IEnumerable<Attribute>
Raccolta di attributi personalizzati da applicare alla proprietà.
- getterCustomAttributes
- IEnumerable<Attribute>
Raccolta di attributi personalizzati da applicare alla funzione di accesso get
della proprietà.
- setterCustomAttributes
- IEnumerable<Attribute>
Raccolta di attributi personalizzati da applicare alla funzione di accesso set
della proprietà.
Restituisce
Oggetto che rappresenta la proprietà.
Commenti
Gli oggetti restituiti da questo metodo non sono oggetti completi PropertyInfo e devono essere usati solo nel contesto del AddProperties metodo.