CustomAttributeExtensions.IsDefined Metode

Definisi

Menunjukkan apakah atribut kustom diterapkan ke elemen.

Overload

IsDefined(MemberInfo, Type, Boolean)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke anggota tertentu, dan, secara opsional, diterapkan ke leluhurnya.

IsDefined(Assembly, Type)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke rakitan tertentu.

IsDefined(MemberInfo, Type)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke anggota tertentu.

IsDefined(Module, Type)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke modul tertentu.

IsDefined(ParameterInfo, Type)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke parameter tertentu.

IsDefined(ParameterInfo, Type, Boolean)

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke parameter tertentu, dan, secara opsional, diterapkan ke leluhurnya.

IsDefined(MemberInfo, Type, Boolean)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke anggota tertentu, dan, secara opsional, diterapkan ke leluhurnya.

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

Parameter

element
MemberInfo

Anggota yang akan diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

inherit
Boolean

true untuk memeriksa leluhur element; jika tidak, false.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

element bukan konstruktor, metode, properti, peristiwa, jenis, atau bidang.

Berlaku untuk

IsDefined(Assembly, Type)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke rakitan tertentu.

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

Parameter

element
Assembly

Perakitan untuk diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

Berlaku untuk

IsDefined(MemberInfo, Type)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke anggota tertentu.

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

Parameter

element
MemberInfo

Anggota yang akan diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

element bukan konstruktor, metode, properti, peristiwa, jenis, atau bidang.

Berlaku untuk

IsDefined(Module, Type)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke modul tertentu.

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

Parameter

element
Module

Modul yang akan diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

Berlaku untuk

IsDefined(ParameterInfo, Type)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke parameter tertentu.

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

Parameter

element
ParameterInfo

Parameter yang akan diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

Berlaku untuk

IsDefined(ParameterInfo, Type, Boolean)

Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs
Sumber:
CustomAttributeExtensions.cs

Menunjukkan apakah atribut kustom dari jenis tertentu diterapkan ke parameter tertentu, dan, secara opsional, diterapkan ke leluhurnya.

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

Parameter

element
ParameterInfo

Parameter yang akan diperiksa.

attributeType
Type

Jenis atribut yang akan dicari.

inherit
Boolean

true untuk memeriksa leluhur element; jika tidak, false.

Mengembalikan

true jika atribut dari jenis yang ditentukan diterapkan ke element; jika tidak, false.

Pengecualian

element atau attributeType adalah null.

attributeType tidak berasal dari Attribute.

Berlaku untuk