ExpandableObjectConverter.GetProperties メソッド

定義

value パラメーターに指定されたオブジェクト型のプロパティのコレクションを取得します。

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);
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 、配列をフィルター処理するために使用されます。 と attributes オブジェクトを混在TypeAttributeさせることができます。 フィルター処理は、次の規則によって定義されます。

  • Typeオブジェクトはワイルドカードとして扱われます。オブジェクトは、属性のセット内の をType持つすべてのプロパティと一致します。

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

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

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

適用対象

こちらもご覧ください