ParameterInfo.GetCustomAttributesData Metoda

Definice

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

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 na aktuální parametr.

Poznámky

Pomocí této metody můžete prozkoumat vlastní atributy kódu v kontextu jen pro reflexi v případech, kdy vlastní atributy jsou definovány v kódu, který je načten do kontextu pouze reflexe. Metody jako Attribute.GetCustomAttributes a ParameterInfo.GetCustomAttributes nelze 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 ve CustomAttributeData třídě.

Platí pro