Module.GetCustomAttributesData Metoda

Definicja

Zwraca listę CustomAttributeData obiektów dla bieżącego modułu, które mogą być używane w kontekście tylko odbicia.

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 modułu.

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 Module.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 przykładowy kod, zobacz klasę CustomAttributeData .

Dotyczy