MethodBuilder.IsDefined(Type, Boolean) Метод
Определение
Проверяет, определен ли заданный тип настраиваемого атрибута.Checks if the specified custom attribute type is defined.
public:
override bool IsDefined(Type ^ attributeType, bool inherit);
public override bool IsDefined (Type attributeType, bool inherit);
override this.IsDefined : Type * bool -> bool
Public Overrides Function IsDefined (attributeType As Type, inherit As Boolean) As Boolean
Параметры
- attributeType
- Type
Тип настраиваемого атрибута.The custom attribute type.
- inherit
- Boolean
Указывает, следует ли выполнять поиск в цепочке наследования этого члена для нахождения настраиваемых атрибутов.Specifies whether to search this member's inheritance chain to find the custom attributes.
Возвращаемое значение
Значение true
, если заданный тип настраиваемых атрибутов определен; в противном случае — значение false
.true
if the specified custom attribute type is defined; otherwise, false
.
Исключения
В настоящее время этот метод не поддерживается.This method is not currently supported. Извлеките метод с помощью GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) и вызовите IsDefined(Type, Boolean) в возвращенном методе MethodInfo.Retrieve the method using GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) and call IsDefined(Type, Boolean) on the returned MethodInfo.