CustomAttributeExtensions.IsDefined Método
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Indica se os atributos personalizados são aplicados a um elemento.
IsDefined(MemberInfo, Type, Boolean) |
Indica se atributos personalizados de um tipo especificado são aplicados a um membro especificado e, opcionalmente, aplicados a seus ancestrais. |
IsDefined(Assembly, Type) |
Indica se atributos personalizados de um tipo especificado são aplicados a um assembly 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 parâmetro especificado e, opcionalmente, aplicados a seus ancestrais. |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
Indica se 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 do atributo a ser pesquisado.
- inherit
- Boolean
true
inspecionar os ancestrais do element
; caso contrário, false
.
Retornos
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.
element
não é um construtor, método, propriedade, evento, tipo ou campo.
Aplica-se a
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
Indica se atributos personalizados de um tipo especificado 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 do atributo a ser pesquisado.
Retornos
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
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
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 ser inspecionado.
- attributeType
- Type
O tipo de atributo a ser pesquisado.
Retornos
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.
element
não é um construtor, método, propriedade, evento, tipo ou campo.
Aplica-se a
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
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 ser inspecionado.
- attributeType
- Type
O tipo de atributo a ser pesquisado.
Retornos
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
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
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 ser inspecionado.
- attributeType
- Type
O tipo de atributo a ser pesquisado.
Retornos
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
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
- Origem:
- CustomAttributeExtensions.cs
Indica se 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
inspecionar os ancestrais do element
; caso contrário, false
.
Retornos
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
.NET 9 e outras versões
Produto | Versões |
---|---|
.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 |
Comentários do .NET
O .NET é um projeto código aberto. Selecione um link para fornecer comentários: