AttributeTable.GetCustomAttributes Metodo

Definizione

Restituisce un'enumerazione di tutti gli attributi forniti per gli argomenti specificati.

Overload

GetCustomAttributes(Type)

Restituisce un'enumerazione di tutti gli attributi a livello di classe forniti per il tipo specificato.

GetCustomAttributes(Type, MemberDescriptor)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

GetCustomAttributes(Type, MemberInfo)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

GetCustomAttributes(Type, String)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

GetCustomAttributes(Type, DependencyProperty)

Restituisce un'enumerazione di tutti gli attributi forniti per la dipendenza specificata del tipo indicato.

Commenti

Questo metodo non restituisce mai un'enumerazione di valori null.

GetCustomAttributes(Type)

Restituisce un'enumerazione di tutti gli attributi a livello di classe forniti per il tipo specificato.

public:
 System::Collections::IEnumerable ^ GetCustomAttributes(Type ^ type);
public System.Collections.IEnumerable GetCustomAttributes (Type type);
member this.GetCustomAttributes : Type -> System.Collections.IEnumerable
Public Function GetCustomAttributes (type As Type) As IEnumerable

Parametri

type
Type

Tipo per cui ottenere attributi a livello di classe.

Restituisce

IEnumerable

Enumerazione di attributi che corrispondono ai criteri. Non viene mai restituita un'enumerazione di valori null.

Eccezioni

type è null.

Si applica a

GetCustomAttributes(Type, MemberDescriptor)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

public:
 System::Collections::IEnumerable ^ GetCustomAttributes(Type ^ ownerType, System::ComponentModel::MemberDescriptor ^ descriptor);
public System.Collections.IEnumerable GetCustomAttributes (Type ownerType, System.ComponentModel.MemberDescriptor descriptor);
member this.GetCustomAttributes : Type * System.ComponentModel.MemberDescriptor -> System.Collections.IEnumerable
Public Function GetCustomAttributes (ownerType As Type, descriptor As MemberDescriptor) As IEnumerable

Parametri

ownerType
Type

Tipo che contiene il membro.

descriptor
MemberDescriptor

Descrittore del membro per il quale ottenere attributi personalizzati.

Restituisce

IEnumerable

Enumerazione di attributi che corrispondono ai criteri. Non viene mai restituita un'enumerazione di valori null.

Eccezioni

ownerType o descriptor è null.

Si applica a

GetCustomAttributes(Type, MemberInfo)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

public:
 System::Collections::IEnumerable ^ GetCustomAttributes(Type ^ ownerType, System::Reflection::MemberInfo ^ member);
public System.Collections.IEnumerable GetCustomAttributes (Type ownerType, System.Reflection.MemberInfo member);
member this.GetCustomAttributes : Type * System.Reflection.MemberInfo -> System.Collections.IEnumerable
Public Function GetCustomAttributes (ownerType As Type, member As MemberInfo) As IEnumerable

Parametri

ownerType
Type

Tipo che contiene il membro.

member
MemberInfo

Membro per il quale fornire attributi.

Restituisce

IEnumerable

Enumerazione di attributi che corrispondono ai criteri. Non viene mai restituita un'enumerazione di valori null.

Eccezioni

ownerType o member è null.

Si applica a

GetCustomAttributes(Type, String)

Restituisce un'enumerazione di tutti gli attributi forniti per il membro specificato del tipo indicato.

public:
 System::Collections::IEnumerable ^ GetCustomAttributes(Type ^ ownerType, System::String ^ memberName);
public System.Collections.IEnumerable GetCustomAttributes (Type ownerType, string memberName);
member this.GetCustomAttributes : Type * string -> System.Collections.IEnumerable
Public Function GetCustomAttributes (ownerType As Type, memberName As String) As IEnumerable

Parametri

ownerType
Type

Tipo di proprietario della proprietà di dipendenza.

memberName
String

Nome del membro per cui fornire attributi.

Restituisce

IEnumerable

Enumerazione di attributi che corrispondono ai criteri. Non viene mai restituita un'enumerazione di valori null.

Eccezioni

ownerType o memberName è null.

Si applica a

GetCustomAttributes(Type, DependencyProperty)

Restituisce un'enumerazione di tutti gli attributi forniti per la dipendenza specificata del tipo indicato.

public:
 System::Collections::IEnumerable ^ GetCustomAttributes(Type ^ ownerType, System::Windows::DependencyProperty ^ dp);
public System.Collections.IEnumerable GetCustomAttributes (Type ownerType, System.Windows.DependencyProperty dp);
member this.GetCustomAttributes : Type * System.Windows.DependencyProperty -> System.Collections.IEnumerable
Public Function GetCustomAttributes (ownerType As Type, dp As DependencyProperty) As IEnumerable

Parametri

ownerType
Type

Tipo di proprietario della proprietà di dipendenza.

dp
DependencyProperty

Proprietà di dipendenza per la quale ottenere attributi personalizzati.

Restituisce

IEnumerable

Enumerazione di attributi che corrispondono ai criteri. Non viene mai restituita un'enumerazione di valori null.

Eccezioni

ownerType o dp è null.

Si applica a