CustomAttributeExtensions.IsDefined CustomAttributeExtensions.IsDefined CustomAttributeExtensions.IsDefined CustomAttributeExtensions.IsDefined Method

Definición

Indica si los atributos personalizados se aplican a un elemento.Indicates whether custom attributes are applied to an element.

Sobrecargas

IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean)

Indica si los atributos personalizados de un tipo especificado se aplican a un miembro especificado y, opcionalmente, se aplican a sus antecesores.Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.

IsDefined(Assembly, Type) IsDefined(Assembly, Type) IsDefined(Assembly, Type) IsDefined(Assembly, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un ensamblado especificado.Indicates whether custom attributes of a specified type are applied to a specified assembly.

IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un miembro especificado.Indicates whether custom attributes of a specified type are applied to a specified member.

IsDefined(Module, Type) IsDefined(Module, Type) IsDefined(Module, Type) IsDefined(Module, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un módulo especificado.Indicates whether custom attributes of a specified type are applied to a specified module.

IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un parámetro especificado.Indicates whether custom attributes of a specified type are applied to a specified parameter.

IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean)

Indica si los atributos personalizados de un tipo especificado se aplican a un parámetro especificado y, opcionalmente, se aplican a sus antecesores.Indicates whether custom attributes of a specified type are applied to a specified parameter, and, optionally, applied to its ancestors.

IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean) IsDefined(MemberInfo, Type, Boolean)

Indica si los atributos personalizados de un tipo especificado se aplican a un miembro especificado y, opcionalmente, se aplican a sus antecesores.Indicates whether custom attributes of a specified type are applied to a specified member, and, optionally, applied to its ancestors.

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 MemberInfo MemberInfo MemberInfo

Miembro que se va a inspeccionar.The member to inspect.

attributeType
Type Type Type Type

Tipo del atributo que se va a buscar.The type of the attribute to search for.

inherit
Boolean Boolean Boolean Boolean

Es true para inspeccionar los antecesores de element; de lo contrario, es false.true to inspect the ancestors of element; otherwise, false.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

element no es un constructor, método, propiedad, evento, tipo o campo.element is not a constructor, method, property, event, type, or field.

IsDefined(Assembly, Type) IsDefined(Assembly, Type) IsDefined(Assembly, Type) IsDefined(Assembly, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un ensamblado especificado.Indicates whether custom attributes of a specified type are applied to a specified assembly.

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 Assembly Assembly Assembly

Ensamblado que se va a inspeccionar.The assembly to inspect.

attributeType
Type Type Type Type

Tipo del atributo que se va a buscar.The type of the attribute to search for.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type) IsDefined(MemberInfo, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un miembro especificado.Indicates whether custom attributes of a specified type are applied to a specified member.

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 MemberInfo MemberInfo MemberInfo

Miembro que se va a inspeccionar.The member to inspect.

attributeType
Type Type Type Type

El tipo de atributo que se va a buscar.The type of attribute to search for.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

element no es un constructor, método, propiedad, evento, tipo o campo.element is not a constructor, method, property, event, type, or field.

IsDefined(Module, Type) IsDefined(Module, Type) IsDefined(Module, Type) IsDefined(Module, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un módulo especificado.Indicates whether custom attributes of a specified type are applied to a specified module.

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 Module Module Module

Módulo que se va a inspeccionar.The module to inspect.

attributeType
Type Type Type Type

El tipo de atributo que se va a buscar.The type of attribute to search for.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type) IsDefined(ParameterInfo, Type)

Indica si se deben aplicar atributos personalizados de un tipo especificado a un parámetro especificado.Indicates whether custom attributes of a specified type are applied to a specified parameter.

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 ParameterInfo ParameterInfo ParameterInfo

Parámetro que se va a inspeccionar.The parameter to inspect.

attributeType
Type Type Type Type

El tipo de atributo que se va a buscar.The type of attribute to search for.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean) IsDefined(ParameterInfo, Type, Boolean)

Indica si los atributos personalizados de un tipo especificado se aplican a un parámetro especificado y, opcionalmente, se aplican a sus antecesores.Indicates whether custom attributes of a specified type are applied to a specified parameter, and, optionally, applied to its ancestors.

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 ParameterInfo ParameterInfo ParameterInfo

Parámetro que se va a inspeccionar.The parameter to inspect.

attributeType
Type Type Type Type

El tipo de atributo que se va a buscar.The type of attribute to search for.

inherit
Boolean Boolean Boolean Boolean

Es true para inspeccionar los antecesores de element; de lo contrario, es false.true to inspect the ancestors of element; otherwise, false.

Devoluciones

Es true si un atributo del tipo especificado se aplica a element; de lo contrario, es false.true if an attribute of the specified type is applied to element; otherwise, false.

Excepciones

element o attributeType es null.element or attributeType is null.

attributeType no se deriva de Attribute.attributeType is not derived from Attribute.

Se aplica a