TypeConverter.GetProperties Metode

Definisi

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

Overload

Nama Deskripsi
GetProperties(Object)

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

GetProperties(ITypeDescriptorContext, Object)

Mengembalikan kumpulan properti untuk jenis array yang ditentukan oleh parameter nilai, menggunakan konteks yang ditentukan.

GetProperties(ITypeDescriptorContext, Object, Attribute[])

Mengembalikan kumpulan properti untuk jenis array yang ditentukan oleh parameter nilai, menggunakan konteks dan atribut yang ditentukan.

GetProperties(Object)

Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs

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

public:
 System::ComponentModel::PropertyDescriptorCollection ^ GetProperties(System::Object ^ value);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")]
public System.ComponentModel.PropertyDescriptorCollection? GetProperties(object value);
public System.ComponentModel.PropertyDescriptorCollection GetProperties(object value);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")>]
member this.GetProperties : obj -> System.ComponentModel.PropertyDescriptorCollection
member this.GetProperties : obj -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetProperties (value As Object) As PropertyDescriptorCollection

Parameter

value
Object

Yang Object menentukan jenis array untuk mendapatkan properti.

Mengembalikan

PropertyDescriptorCollection dengan properti yang diekspos untuk jenis data ini, atau null jika tidak ada properti.

Atribut

Keterangan

Seperti yang diimplementasikan di kelas ini, metode ini selalu mengembalikan null.

Secara default, jenis tidak mengembalikan properti. Implementasi yang mudah dari metode ini dapat memanggil GetProperties jenis data yang benar.

Berlaku untuk

GetProperties(ITypeDescriptorContext, Object)

Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs

Mengembalikan kumpulan properti untuk jenis array yang ditentukan oleh parameter nilai, menggunakan konteks yang ditentukan.

public:
 System::ComponentModel::PropertyDescriptorCollection ^ GetProperties(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")]
public System.ComponentModel.PropertyDescriptorCollection? GetProperties(System.ComponentModel.ITypeDescriptorContext? context, object value);
public System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered.")>]
member this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj -> System.ComponentModel.PropertyDescriptorCollection
member this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj -> System.ComponentModel.PropertyDescriptorCollection
Public Function GetProperties (context As ITypeDescriptorContext, value As Object) As PropertyDescriptorCollection

Parameter

context
ITypeDescriptorContext

Yang ITypeDescriptorContext menyediakan konteks format.

value
Object

Yang Object menentukan jenis array untuk mendapatkan properti.

Mengembalikan

PropertyDescriptorCollection dengan properti yang diekspos untuk jenis data ini, atau null jika tidak ada properti.

Atribut

Keterangan

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

Seperti yang diimplementasikan di kelas ini, metode ini selalu mengembalikan null.

Secara default, jenis tidak mengembalikan properti. Implementasi yang mudah dari metode ini dapat memanggil GetProperties jenis data yang benar.

Lihat juga

Berlaku untuk

GetProperties(ITypeDescriptorContext, Object, Attribute[])

Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs
Sumber:
TypeConverter.cs

Mengembalikan kumpulan properti untuk jenis array yang ditentukan oleh parameter nilai, menggunakan konteks dan atribut yang ditentukan.

public:
 virtual System::ComponentModel::PropertyDescriptorCollection ^ GetProperties(System::ComponentModel::ITypeDescriptorContext ^ context, System::Object ^ value, cli::array <Attribute ^> ^ attributes);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")]
public virtual System.ComponentModel.PropertyDescriptorCollection? GetProperties(System.ComponentModel.ITypeDescriptorContext? context, object value, Attribute[]? attributes);
public virtual System.ComponentModel.PropertyDescriptorCollection GetProperties(System.ComponentModel.ITypeDescriptorContext context, object value, Attribute[] attributes);
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("The Type of value cannot be statically discovered. The public parameterless constructor or the 'Default' static field may be trimmed from the Attribute's Type.")>]
abstract member GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
override this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
abstract member GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
override this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
Public Overridable 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 digunakan sebagai filter.

Mengembalikan

PropertyDescriptorCollection dengan properti yang diekspos untuk jenis data ini, atau null jika tidak ada properti.

Atribut

Keterangan

Seperti yang diimplementasikan di kelas ini, metode ini selalu mengembalikan null.

Catatan Bagi Inheritor

Ambil alih metode ini jika jenis yang ingin Anda konversi mendukung properti.

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

Array atribut digunakan untuk memfilter array. Atribut dapat memiliki campuran Type objek dan Attribute . Pemfilteran ditentukan oleh aturan berikut:

  • Type diperlakukan sebagai kartubebas; cocok dengan properti yang memiliki Type dalam sekumpulan atributnya.

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

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

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

Lihat juga

Berlaku untuk