ArrayConverter.GetProperties メソッド

定義

値パラメーターで指定された配列の型のプロパティのコレクションを取得します。

public:
 override System::ComponentModel::PropertyDescriptorCollection ^ GetProperties(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value, cli::array <Attribute ^> ^ attributes);
public override System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, Attribute[] attributes);
override this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overrides Function GetProperties (context As ITypeDescriptorContext, value As Object, attributes As Attribute()) As PropertyDescriptorCollection

パラメーター

context
ITypeDescriptorContext

形式コンテキストを提供する ITypeDescriptorContext

value
Object

プロパティを取得する配列の型を指定する Object

attributes
Attribute[]

フィルターとして使用される Attribute 型の配列。

返品

配列に対して公開されるプロパティを含む PropertyDescriptorCollection 。プロパティがない場合は null

注釈

context パラメーターを使用すると、コンバーターが呼び出される環境に関する追加情報を抽出できます。 これは nullできるため、常に確認してください。 また、コンテキスト オブジェクトのプロパティは、 nullを返すことができます。

属性配列は、配列をフィルター処理するために使用されます。 attributes パラメーターは、TypeオブジェクトとAttribute オブジェクトの組み合わせを指定できます。 フィルター処理は、次の規則によって定義されます。

  • Typeはワイルドカードとして扱われます。属性のセットにTypeを持つプロパティと一致します。

  • プロパティに同じクラスの Attribute がない場合、プロパティは返される配列に含まれません。

  • 属性が Attributeのインスタンスである場合、プロパティは完全に一致する必要があります。または、返される配列には含まれません。

  • Attribute インスタンスが指定され、それが既定のプロパティである場合、プロパティにAttributeのインスタンスがない場合でも、返される配列に含まれます。

適用対象