CustomAttributeExtensions.IsDefined Método

Definição

Indica se atributos personalizados são aplicados a um elemento.

Sobrecargas

Name Description
IsDefined(MemberInfo, Type, Boolean)

Indica se atributos personalizados de um tipo especificado são aplicados a um membro especificado e, opcionalmente, aplicados aos seus antecessores.

IsDefined(Assembly, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um conjunto especificado.

IsDefined(MemberInfo, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um membro especificado.

IsDefined(Module, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um módulo especificado.

IsDefined(ParameterInfo, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um parâmetro especificado.

IsDefined(ParameterInfo, Type, Boolean)

Indica se atributos personalizados de um tipo especificado são aplicados a um determinado parâmetro e, opcionalmente, aplicados aos seus antecessores.

IsDefined(MemberInfo, Type, Boolean)

Indica se atributos personalizados de um tipo especificado são aplicados a um membro especificado e, opcionalmente, aplicados aos seus antecessores.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::MemberInfo ^ element, Type ^ attributeType, bool inherit);
public static bool IsDefined(this System.Reflection.MemberInfo element, Type attributeType, bool inherit);
static member IsDefined : System.Reflection.MemberInfo * Type * bool -> bool
<Extension()>
Public Function IsDefined (element As MemberInfo, attributeType As Type, inherit As Boolean) As Boolean

Parâmetros

element
MemberInfo

O membro a inspecionar.

attributeType
Type

O tipo do atributo a procurar.

inherit
Boolean

true para inspecionar os antepassados de element; caso contrário, false.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

element não é um construtor, método, propriedade, evento, tipo ou campo.

Aplica-se a

IsDefined(Assembly, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um conjunto especificado.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::Assembly ^ element, Type ^ attributeType);
public static bool IsDefined(this System.Reflection.Assembly element, Type attributeType);
static member IsDefined : System.Reflection.Assembly * Type -> bool
<Extension()>
Public Function IsDefined (element As Assembly, attributeType As Type) As Boolean

Parâmetros

element
Assembly

A montagem a inspecionar.

attributeType
Type

O tipo do atributo a procurar.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

Aplica-se a

IsDefined(MemberInfo, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um membro especificado.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::MemberInfo ^ element, Type ^ attributeType);
public static bool IsDefined(this System.Reflection.MemberInfo element, Type attributeType);
static member IsDefined : System.Reflection.MemberInfo * Type -> bool
<Extension()>
Public Function IsDefined (element As MemberInfo, attributeType As Type) As Boolean

Parâmetros

element
MemberInfo

O membro a inspecionar.

attributeType
Type

O tipo de atributo a procurar.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

element não é um construtor, método, propriedade, evento, tipo ou campo.

Aplica-se a

IsDefined(Module, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um módulo especificado.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::Module ^ element, Type ^ attributeType);
public static bool IsDefined(this System.Reflection.Module element, Type attributeType);
static member IsDefined : System.Reflection.Module * Type -> bool
<Extension()>
Public Function IsDefined (element As Module, attributeType As Type) As Boolean

Parâmetros

element
Module

O módulo a inspecionar.

attributeType
Type

O tipo de atributo a procurar.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

Aplica-se a

IsDefined(ParameterInfo, Type)

Indica se atributos personalizados de um tipo especificado são aplicados a um parâmetro especificado.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::ParameterInfo ^ element, Type ^ attributeType);
public static bool IsDefined(this System.Reflection.ParameterInfo element, Type attributeType);
static member IsDefined : System.Reflection.ParameterInfo * Type -> bool
<Extension()>
Public Function IsDefined (element As ParameterInfo, attributeType As Type) As Boolean

Parâmetros

element
ParameterInfo

O parâmetro a inspecionar.

attributeType
Type

O tipo de atributo a procurar.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

Aplica-se a

IsDefined(ParameterInfo, Type, Boolean)

Indica se atributos personalizados de um tipo especificado são aplicados a um determinado parâmetro e, opcionalmente, aplicados aos seus antecessores.

public:
[System::Runtime::CompilerServices::Extension]
 static bool IsDefined(System::Reflection::ParameterInfo ^ element, Type ^ attributeType, bool inherit);
public static bool IsDefined(this System.Reflection.ParameterInfo element, Type attributeType, bool inherit);
static member IsDefined : System.Reflection.ParameterInfo * Type * bool -> bool
<Extension()>
Public Function IsDefined (element As ParameterInfo, attributeType As Type, inherit As Boolean) As Boolean

Parâmetros

element
ParameterInfo

O parâmetro a inspecionar.

attributeType
Type

O tipo de atributo a procurar.

inherit
Boolean

true para inspecionar os antepassados de element; caso contrário, false.

Devoluções

true se um atributo do tipo especificado for aplicado a element; caso contrário, false.

Exceções

element ou attributeType é null.

attributeType não deriva de Attribute.

Aplica-se a