MethodBuilder.GetCustomAttributes Metoda

Definicja

Zwraca atrybuty niestandardowe zdefiniowane dla tej metody.

Przeciążenia

GetCustomAttributes(Boolean)

Zwraca wszystkie atrybuty niestandardowe zdefiniowane dla tej metody.

GetCustomAttributes(Type, Boolean)

Zwraca atrybuty niestandardowe identyfikowane przez dany typ.

GetCustomAttributes(Boolean)

Źródło:
MethodBuilder.cs

Zwraca wszystkie atrybuty niestandardowe zdefiniowane dla tej metody.

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()

Parametry

inherit
Boolean

Określa, czy przeszukiwać łańcuch dziedziczenia tego elementu członkowskiego w celu znalezienia atrybutów niestandardowych.

Zwraca

Object[]

Zwraca tablicę obiektów reprezentujących wszystkie atrybuty niestandardowe tej metody.

Wyjątki

Ta metoda nie jest obecnie obsługiwana. Pobierz metodę przy użyciu metody GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) i wywołaj GetCustomAttributes(Boolean) metodę dla zwróconej MethodInfometody .

Dotyczy

GetCustomAttributes(Type, Boolean)

Źródło:
MethodBuilder.cs

Zwraca atrybuty niestandardowe identyfikowane przez dany typ.

public:
 override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()

Parametry

attributeType
Type

Typ atrybutu niestandardowego.

inherit
Boolean

Określa, czy przeszukiwać łańcuch dziedziczenia tego elementu członkowskiego w celu znalezienia atrybutów niestandardowych.

Zwraca

Object[]

Zwraca tablicę obiektów reprezentujących atrybuty tej metody, które są typu attributeType.

Wyjątki

Ta metoda nie jest obecnie obsługiwana. Pobierz metodę przy użyciu metody GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) i wywołaj GetCustomAttributes(Boolean) metodę dla zwróconej MethodInfometody .

Dotyczy