CustomReflectionContext.CreateProperty メソッド

定義

AddProperties(Type) メソッドで指定された、型に追加するプロパティを表すオブジェクトを作成します。

オーバーロード

名前 説明
CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>)

AddProperties(Type) メソッドで使用する、型に追加するプロパティを表すオブジェクトを作成します。

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

AddProperties(Type) メソッドで使用し、指定したカスタム属性を使用して、型に追加するプロパティを表すオブジェクトを作成します。

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

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

パラメーター

propertyType
Type

作成するプロパティの型。

name
String

作成するプロパティの名前。

getter
Func<Object,Object>

プロパティの get アクセサーを表すオブジェクト。

setter
Action<Object,Object>

プロパティの set アクセサーを表すオブジェクト。

返品

プロパティを表すオブジェクト。

注釈

このメソッドによって返されるオブジェクトは、オブジェクト PropertyInfo 完全ではなく、 AddProperties メソッドのコンテキストでのみ使用する必要があります。

適用対象

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

AddProperties(Type) メソッドで使用し、指定したカスタム属性を使用して、型に追加するプロパティを表すオブジェクトを作成します。

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

パラメーター

propertyType
Type

作成するプロパティの型。

name
String

作成するプロパティの名前。

getter
Func<Object,Object>

プロパティの get アクセサーを表すオブジェクト。

setter
Action<Object,Object>

プロパティの set アクセサーを表すオブジェクト。

propertyCustomAttributes
IEnumerable<Attribute>

プロパティに適用するカスタム属性のコレクション。

getterCustomAttributes
IEnumerable<Attribute>

プロパティの get アクセサーに適用するカスタム属性のコレクション。

setterCustomAttributes
IEnumerable<Attribute>

プロパティの set アクセサーに適用するカスタム属性のコレクション。

返品

プロパティを表すオブジェクト。

注釈

このメソッドによって返されるオブジェクトは、オブジェクト PropertyInfo 完全ではなく、 AddProperties メソッドのコンテキストでのみ使用する必要があります。

適用対象