CustomAttributeExtensions.IsDefined Método
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Indica si los atributos personalizados se aplican a un elemento.
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. |
IsDefined(Assembly, Type) |
Indica si se deben aplicar atributos personalizados de un tipo especificado a un ensamblado especificado. |
IsDefined(MemberInfo, Type) |
Indica si se deben aplicar atributos personalizados de un tipo especificado a un miembro especificado. |
IsDefined(Module, Type) |
Indica si se deben aplicar atributos personalizados de un tipo especificado a un módulo especificado. |
IsDefined(ParameterInfo, Type) |
Indica si se deben aplicar atributos personalizados de un tipo especificado a un parámetro especificado. |
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. |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si los atributos personalizados de un tipo especificado se aplican a un miembro especificado y, opcionalmente, se aplican a sus antecesores.
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
Miembro que se va a inspeccionar.
- attributeType
- Type
Tipo del atributo que se va a buscar.
- inherit
- Boolean
Es true
para inspeccionar los antecesores de element
; de lo contrario, es false
.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
element
no es un constructor, método, propiedad, evento, tipo o campo.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si se deben aplicar atributos personalizados de un tipo especificado a un ensamblado 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
Ensamblado que se va a inspeccionar.
- attributeType
- Type
Tipo del atributo que se va a buscar.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si se deben aplicar atributos personalizados de un tipo especificado a un miembro 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
Miembro que se va a inspeccionar.
- attributeType
- Type
El tipo de atributo que se va a buscar.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
element
no es un constructor, método, propiedad, evento, tipo o campo.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si se deben aplicar atributos personalizados de un tipo especificado a un 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
Módulo que se va a inspeccionar.
- attributeType
- Type
El tipo de atributo que se va a buscar.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si se deben aplicar atributos personalizados de un tipo especificado a un 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
Parámetro que se va a inspeccionar.
- attributeType
- Type
El tipo de atributo que se va a buscar.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
- Source:
- CustomAttributeExtensions.cs
Indica si los atributos personalizados de un tipo especificado se aplican a un parámetro especificado y, opcionalmente, se aplican a sus antecesores.
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
Parámetro que se va a inspeccionar.
- attributeType
- Type
El tipo de atributo que se va a buscar.
- inherit
- Boolean
Es true
para inspeccionar los antecesores de element
; de lo contrario, es false
.
Devoluciones
Es true
si un atributo del tipo especificado se aplica a element
; de lo contrario, es false
.
Excepciones
element
o attributeType
es null
.
attributeType
no se deriva de Attribute.
Se aplica a
.NET 9 y otras versiones
Producto | Versiones |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
Comentarios de .NET
.NET es un proyecto de código abierto. Seleccione un vínculo para proporcionar comentarios: