AttributeTable.GetCustomAttributes Metodo

Definizione

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

Overload

Nome Descrizione
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 specificato.

GetCustomAttributes(Type, MemberInfo)

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

GetCustomAttributes(Type, String)

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

GetCustomAttributes(Type, DependencyProperty)

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

Commenti

Questo metodo non restituisce mai un'enumerazione 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 gli attributi a livello di classe.

Valori restituiti

Enumerazione di attributi che corrispondono ai criteri. In questo modo non verrà mai restituita un'enumerazione Null.

Eccezioni

type è null.

Si applica a

GetCustomAttributes(Type, MemberDescriptor)

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

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 di membro per cui ottenere attributi personalizzati.

Valori restituiti

Enumerazione di attributi che corrispondono ai criteri. In questo modo non verrà mai restituita un'enumerazione 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 specificato.

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 cui specificare gli attributi.

Valori restituiti

Enumerazione di attributi che corrispondono ai criteri. In questo modo non verrà mai restituita un'enumerazione 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 specificato.

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 specificare gli attributi.

Valori restituiti

Enumerazione di attributi che corrispondono ai criteri. In questo modo non verrà mai restituita un'enumerazione 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 specificato.

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 cui ottenere attributi personalizzati.

Valori restituiti

Enumerazione di attributi che corrispondono ai criteri. In questo modo non verrà mai restituita un'enumerazione Null.

Eccezioni

ownerType o dp è null.

Si applica a