ParameterInfo.GetCustomAttributesData Metoda

Definice

Vrátí seznam CustomAttributeData objektů pro aktuální parametr, který lze použít pouze v kontextu reflexe.

public:
 virtual System::Collections::Generic::IList<System::Reflection::CustomAttributeData ^> ^ GetCustomAttributesData();
public virtual System.Collections.Generic.IList<System.Reflection.CustomAttributeData> GetCustomAttributesData();
abstract member GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
override this.GetCustomAttributesData : unit -> System.Collections.Generic.IList<System.Reflection.CustomAttributeData>
Public Overridable Function GetCustomAttributesData () As IList(Of CustomAttributeData)

Návraty

Obecný seznam CustomAttributeData objektů představujících data o atributech, které byly použity pro aktuální parametr.

Poznámky

Tato metoda slouží k prozkoumání vlastních atributů kódu v kontextu jen reflexe, v případech, kdy jsou vlastní atributy samotné definovány v kódu, který je načten do kontextu jen reflexe. Metody jako Attribute.GetCustomAttributes a ParameterInfo.GetCustomAttributes nelze je v takových případech použít, protože vytvářejí instance atributů. Kód v kontextu jen pro reflexi nelze spustit. Další informace a ukázkový kód najdete v CustomAttributeData třídě.

Platí pro