Assembly.GetCustomAttributesData Metoda

Definicja

Zwraca informacje o atrybutach, które zostały zastosowane do bieżącej Assemblywartości , wyrażonej jako CustomAttributeData obiekty.

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)

Zwraca

Ogólna lista CustomAttributeData obiektów reprezentujących dane dotyczące atrybutów, które zostały zastosowane do bieżącego zestawu.

Uwagi

Ta metoda służy do badania niestandardowych atrybutów kodu w kontekście tylko odbicia, w przypadkach, gdy same atrybuty niestandardowe są definiowane w kodzie załadowanym do kontekstu tylko odbicia. Metody takie jak Attribute.GetCustomAttributes i Assembly.GetCustomAttributes nie mogą być używane w takich przypadkach, ponieważ tworzą wystąpienia atrybutów. Nie można wykonać kodu w kontekście tylko odbicia. Aby uzyskać więcej informacji i na przykład kodu, zobacz klasę CustomAttributeData .

Dotyczy