CustomReflectionContext.CreateProperty Yöntem

Tanım

yöntemi tarafından AddProperties(Type) belirtildiği gibi bir türe eklenecek özelliği temsil eden bir nesne oluşturur.

Aşırı Yüklemeler

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

yöntemiyle AddProperties(Type) kullanılacak bir türe eklenecek özelliği temsil eden bir nesne oluşturur.

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

yöntemiyle AddProperties(Type) kullanılacak ve belirtilen özel öznitelikleri kullanarak bir türe eklenecek özelliği temsil eden bir nesne oluşturur.

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

Kaynak:
CustomReflectionContext.cs
Kaynak:
CustomReflectionContext.cs
Kaynak:
CustomReflectionContext.cs

yöntemiyle AddProperties(Type) kullanılacak bir türe eklenecek özelliği temsil eden bir nesne oluşturur.

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);
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

Parametreler

propertyType
Type

Oluşturulacak özelliğin türü.

name
String

Oluşturulacak özelliğin adı.

getter
Func<Object,Object>

Özelliğin get erişimcisini temsil eden nesne.

setter
Action<Object,Object>

Özelliğin set erişimcisini temsil eden nesne.

Döndürülenler

özelliğini temsil eden bir nesne.

Açıklamalar

Bu yöntem tarafından döndürülen nesneler tam PropertyInfo nesneler değildir ve yalnızca yöntemi bağlamında AddProperties kullanılmalıdır.

Şunlara uygulanır

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

Kaynak:
CustomReflectionContext.cs
Kaynak:
CustomReflectionContext.cs
Kaynak:
CustomReflectionContext.cs

yöntemiyle AddProperties(Type) kullanılacak ve belirtilen özel öznitelikleri kullanarak bir türe eklenecek özelliği temsil eden bir nesne oluşturur.

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);
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

Parametreler

propertyType
Type

Oluşturulacak özelliğin türü.

name
String

Oluşturulacak özelliğin adı.

getter
Func<Object,Object>

Özelliğin get erişimcisini temsil eden nesne.

setter
Action<Object,Object>

Özelliğin set erişimcisini temsil eden nesne.

propertyCustomAttributes
IEnumerable<Attribute>

özelliğine uygulanacak özel öznitelik koleksiyonu.

getterCustomAttributes
IEnumerable<Attribute>

Özelliğin get erişimcisine uygulanacak özel öznitelik koleksiyonu.

setterCustomAttributes
IEnumerable<Attribute>

Özelliğin set erişimcisine uygulanacak özel öznitelik koleksiyonu.

Döndürülenler

özelliğini temsil eden bir nesne.

Açıklamalar

Bu yöntem tarafından döndürülen nesneler tam PropertyInfo nesneler değildir ve yalnızca yöntemi bağlamında AddProperties kullanılmalıdır.

Şunlara uygulanır