ArrayConverter.GetProperties Metódus
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Beolvas egy tulajdonsággyűjteményt az értékparaméter által megadott tömbtípushoz.
public:
override 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 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);
[<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.")>]
override this.GetProperties : System.ComponentModel.ITypeDescriptorContext * obj * Attribute[] -> System.ComponentModel.PropertyDescriptorCollection
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
Paraméterek
- context
- ITypeDescriptorContext
Formátumkörnyezetet ITypeDescriptorContext biztosító környezet.
Válaszok
Tömbhöz PropertyDescriptorCollection közzétett tulajdonságok, vagy null ha nincsenek tulajdonságok.
- Attribútumok
Megjegyzések
A context paraméter további információk kinyerésére használható azzal a környezettel kapcsolatban, amelyből a konverter meghívása történik. Ez lehet null, ezért mindig ellenőrizze. A környezeti objektum tulajdonságai is visszaadhatók null.
Az attribútumtömb a tömb szűrésére szolgál. A attributes paraméter megadhatja az objektumok és Type az Attribute objektumok kombinációját. A szűrést a következő szabályok határozzák meg:
Az A Type karakter helyettesítő karakterként lesz kezelve, és minden tulajdonságnak megfelel, amely az Type attribútumkészletében található.
Ha egy tulajdonság nem rendelkezik Attribute ugyanahhoz az osztályhoz, a tulajdonság nem lesz belefoglalva a visszaadott tömbbe.
Ha az attribútum egy példány Attribute, a tulajdonságnak pontos egyezésnek kell lennie, vagy nem szerepel a visszaadott tömbben.
Ha egy Attribute példány meg van adva, és ez az alapértelmezett tulajdonság, akkor is szerepelni fog a visszaadott tömbben, ha a tulajdonságnak nincs példánya Attribute .