Bagikan melalui


ArrayConverter.GetProperties Metode

Definisi

Mendapatkan kumpulan properti untuk jenis array yang ditentukan oleh parameter nilai.

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

Parameter

context
ITypeDescriptorContext

Yang ITypeDescriptorContext menyediakan konteks format.

value
Object

Yang Object menentukan jenis array untuk mendapatkan properti.

attributes
Attribute[]

Array jenis Attribute yang akan digunakan sebagai filter.

Mengembalikan

PropertyDescriptorCollection dengan properti yang diekspos untuk array, atau null jika tidak ada properti.

Keterangan

Parameter context dapat digunakan untuk mengekstrak informasi tambahan tentang lingkungan tempat konverter ini dipanggil. Ini bisa , nulljadi selalu periksa. Selain itu, properti pada objek konteks dapat mengembalikan null.

Array atribut akan digunakan untuk memfilter array. Parameter attributes dapat menentukan campuran Type objek dan Attribute . Pemfilteran ditentukan oleh aturan berikut:

  • Type akan diperlakukan sebagai kartubebas; akan cocok dengan Type properti apa pun yang memiliki dalam set atributnya.

  • Jika properti tidak memiliki Attribute kelas yang sama, properti tidak akan disertakan dalam array yang dikembalikan.

  • Jika atribut adalah instans Attribute, properti harus sama persis atau tidak akan disertakan dalam array yang dikembalikan.

  • Attribute Jika instans ditentukan dan merupakan properti default, instans tersebut akan disertakan dalam array yang dikembalikan meskipun tidak ada instans Attribute dalam properti .

Berlaku untuk