CustomAttributeExtensions.IsDefined Método

Definição

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

Sobrecargas

IsDefined(MemberInfo, Type, Boolean)

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

IsDefined(Assembly, Type)

Indica se os atributos personalizados de um tipo especificados são aplicados a um assembly especificado.

IsDefined(MemberInfo, Type)

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

IsDefined(Module, Type)

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

IsDefined(ParameterInfo, Type)

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

IsDefined(ParameterInfo, Type, Boolean)

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

IsDefined(MemberInfo, Type, Boolean)

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

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 ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

inherit
Boolean

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

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

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

Aplica-se a

IsDefined(Assembly, Type)

Indica se os atributos personalizados de um tipo especificados são aplicados a um assembly 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

O assembly a ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

Aplica-se a

IsDefined(MemberInfo, Type)

Indica se os atributos personalizados de um tipo especificados 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 ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

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

Aplica-se a

IsDefined(Module, Type)

Indica se os atributos personalizados de um tipo especificados 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 ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

Aplica-se a

IsDefined(ParameterInfo, Type)

Indica se os atributos personalizados de um tipo especificados 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 ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

Aplica-se a

IsDefined(ParameterInfo, Type, Boolean)

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

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 ser inspecionado.

attributeType
Type

O tipo de atributo a ser pesquisado.

inherit
Boolean

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

Retornos

Boolean

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

Exceções

element ou attributeType é null.

attributeType não é derivado de Attribute.

Aplica-se a