CustomAttributeExtensions.GetCustomAttributes Метод
Определение
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному элементу.Retrieves a collection of custom attributes that are applied to a specified element.
Перегрузки
GetCustomAttributes(ParameterInfo, Type, Boolean) |
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter. |
GetCustomAttributes(MemberInfo, Type, Boolean) |
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member. |
GetCustomAttributes(ParameterInfo, Type) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному параметру.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter. |
GetCustomAttributes(ParameterInfo, Boolean) |
Извлекает коллекцию пользовательских атрибутов, которые применяются к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes that are applied to a specified parameter, and optionally inspects the ancestors of that parameter. |
GetCustomAttributes(Module, Type) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному модулю.Retrieves a collection of custom attributes of a specified type that are applied to a specified module. |
GetCustomAttributes(MemberInfo, Type) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному элементу.Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
GetCustomAttributes(MemberInfo, Boolean) |
Извлекает коллекцию пользовательских атрибутов, которые применяются к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member. |
GetCustomAttributes(Assembly, Type) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанной сборке.Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly. |
GetCustomAttributes(ParameterInfo) |
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному параметру.Retrieves a collection of custom attributes that are applied to a specified parameter. |
GetCustomAttributes(Module) |
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному модулю.Retrieves a collection of custom attributes that are applied to a specified module. |
GetCustomAttributes(MemberInfo) |
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному члену.Retrieves a collection of custom attributes that are applied to a specified member. |
GetCustomAttributes(Assembly) |
Извлекает коллекцию настраиваемых атрибутов, примененных к указанной сборке.Retrieves a collection of custom attributes that are applied to a specified assembly. |
GetCustomAttributes<T>(ParameterInfo, Boolean) |
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter. |
GetCustomAttributes<T>(MemberInfo, Boolean) |
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member. |
GetCustomAttributes<T>(ParameterInfo) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному параметру.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter. |
GetCustomAttributes<T>(MemberInfo) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному элементу.Retrieves a collection of custom attributes of a specified type that are applied to a specified member. |
GetCustomAttributes<T>(Assembly) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанной сборке.Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly. |
GetCustomAttributes<T>(Module) |
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному модулю.Retrieves a collection of custom attributes of a specified type that are applied to a specified module. |
GetCustomAttributes(ParameterInfo, Type, Boolean)
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, Type ^ attributeType, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.ParameterInfo element, Type attributeType, bool inherit);
static member GetCustomAttributes : System.Reflection.ParameterInfo * Type * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, attributeType As Type, inherit As Boolean) As IEnumerable(Of Attribute)
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Значение параметра element
или attributeType
— null
.element
or attributeType
is null
.
Тип attributeType
не является производным объекта Attribute.attributeType
is not derived from Attribute.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(MemberInfo, Type, Boolean)
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, Type ^ attributeType, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.MemberInfo element, Type attributeType, bool inherit);
static member GetCustomAttributes : System.Reflection.MemberInfo * Type * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, attributeType As Type, inherit As Boolean) As IEnumerable(Of Attribute)
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Значение параметра element
или attributeType
— null
.element
or attributeType
is null
.
Тип attributeType
не является производным объекта Attribute.attributeType
is not derived from Attribute.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(ParameterInfo, Type)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному параметру.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.ParameterInfo element, Type attributeType);
static member GetCustomAttributes : System.Reflection.ParameterInfo * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, attributeType As Type) As IEnumerable(Of Attribute)
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Параметр element
или attributeType
имеет значение null
.element
or attributeType
is null
.
Тип attributeType
не является производным объекта Attribute.attributeType
is not derived from Attribute.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удается загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(ParameterInfo, Boolean)
Извлекает коллекцию пользовательских атрибутов, которые применяются к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.ParameterInfo element, bool inherit);
static member GetCustomAttributes : System.Reflection.ParameterInfo * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo, inherit As Boolean) As IEnumerable(Of Attribute)
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(Module, Type)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному модулю.Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Module ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.Module element, Type attributeType);
static member GetCustomAttributes : System.Reflection.Module * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Module, attributeType As Type) As IEnumerable(Of Attribute)
Параметры
- element
- Module
Проверяемый модуль.The module to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Значение параметра element
или attributeType
— null
.element
or attributeType
is null
.
GetCustomAttributes(MemberInfo, Type)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному элементу.Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.MemberInfo element, Type attributeType);
static member GetCustomAttributes : System.Reflection.MemberInfo * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, attributeType As Type) As IEnumerable(Of Attribute)
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Значение параметра element
или attributeType
— null
.element
or attributeType
is null
.
Тип attributeType
не является производным объекта Attribute.attributeType
is not derived from Attribute.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(MemberInfo, Boolean)
Извлекает коллекцию пользовательских атрибутов, которые применяются к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes that are applied to a specified member, and optionally inspects the ancestors of that member.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.MemberInfo element, bool inherit);
static member GetCustomAttributes : System.Reflection.MemberInfo * bool -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo, inherit As Boolean) As IEnumerable(Of Attribute)
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к параметру element
, соответствующему заданным критериям, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
that match the specified criteria, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удается загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(Assembly, Type)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанной сборке.Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Assembly ^ element, Type ^ attributeType);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.Assembly element, Type attributeType);
static member GetCustomAttributes : System.Reflection.Assembly * Type -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Assembly, attributeType As Type) As IEnumerable(Of Attribute)
Параметры
- element
- Assembly
Сборка для проверки.The assembly to inspect.
- attributeType
- Type
Тип атрибута для поиска.The type of attribute to search for.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют attributeType
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match attributeType
, or an empty collection if no such attributes exist.
Исключения
Параметр element
или attributeType
имеет значение null
.element
or attributeType
is null
.
GetCustomAttributes(ParameterInfo)
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному параметру.Retrieves a collection of custom attributes that are applied to a specified parameter.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.ParameterInfo element);
static member GetCustomAttributes : System.Reflection.ParameterInfo -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As ParameterInfo) As IEnumerable(Of Attribute)
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(Module)
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному модулю.Retrieves a collection of custom attributes that are applied to a specified module.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Module ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.Module element);
static member GetCustomAttributes : System.Reflection.Module -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Module) As IEnumerable(Of Attribute)
Параметры
- element
- Module
Проверяемый модуль.The module to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
, or an empty collection if no such attributes exist.
Исключения
element
— null
.element
is null
.
GetCustomAttributes(MemberInfo)
Извлекает коллекцию настраиваемых атрибутов, примененных к указанному члену.Retrieves a collection of custom attributes that are applied to a specified member.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.MemberInfo element);
static member GetCustomAttributes : System.Reflection.MemberInfo -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As MemberInfo) As IEnumerable(Of Attribute)
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
, or an empty collection if no such attributes exist.
Исключения
element
— null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes(Assembly)
Извлекает коллекцию настраиваемых атрибутов, примененных к указанной сборке.Retrieves a collection of custom attributes that are applied to a specified assembly.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<Attribute ^> ^ GetCustomAttributes(System::Reflection::Assembly ^ element);
public static System.Collections.Generic.IEnumerable<Attribute> GetCustomAttributes (this System.Reflection.Assembly element);
static member GetCustomAttributes : System.Reflection.Assembly -> seq<Attribute>
<Extension()>
Public Function GetCustomAttributes (element As Assembly) As IEnumerable(Of Attribute)
Параметры
- element
- Assembly
Сборка для проверки.The assembly to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
GetCustomAttributes<T>(ParameterInfo, Boolean)
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному параметру и, при необходимости, проверяет предков этого параметра.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter, and optionally inspects the ancestors of that parameter.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.ParameterInfo element, bool inherit) where T : Attribute;
static member GetCustomAttributes : System.Reflection.ParameterInfo * bool -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As ParameterInfo, inherit As Boolean) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes<T>(MemberInfo, Boolean)
Извлекает коллекцию пользовательских атрибутов указанного типа, которые применяется к указанному элементу и, при необходимости, проверяет предков этого элемента.Retrieves a collection of custom attributes of a specified type that are applied to a specified member, and optionally inspects the ancestors of that member.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element, bool inherit);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.MemberInfo element, bool inherit) where T : Attribute;
static member GetCustomAttributes : System.Reflection.MemberInfo * bool -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As MemberInfo, inherit As Boolean) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
- inherit
- Boolean
Значение true
для проверки предков element
; в противном случае — значение false
.true
to inspect the ancestors of element
; otherwise, false
.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes<T>(ParameterInfo)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному параметру.Retrieves a collection of custom attributes of a specified type that are applied to a specified parameter.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::ParameterInfo ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.ParameterInfo element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.ParameterInfo -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As ParameterInfo) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- ParameterInfo
Проверяемый параметр.The parameter to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes<T>(MemberInfo)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному элементу.Retrieves a collection of custom attributes of a specified type that are applied to a specified member.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::MemberInfo ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.MemberInfo element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.MemberInfo -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As MemberInfo) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- MemberInfo
Проверяемый член.The member to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
element
не представляет конструктор, метод, свойство, событие, тип или поле.element
is not a constructor, method, property, event, type, or field.
Не удалось загрузить тип настраиваемого атрибута.A custom attribute type cannot be loaded.
GetCustomAttributes<T>(Assembly)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанной сборке.Retrieves a collection of custom attributes of a specified type that are applied to a specified assembly.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::Assembly ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.Assembly element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.Assembly -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As Assembly) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- Assembly
Сборка для проверки.The assembly to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.
GetCustomAttributes<T>(Module)
Извлекает коллекцию пользовательских атрибутов заданного типа, примененных к указанному модулю.Retrieves a collection of custom attributes of a specified type that are applied to a specified module.
public:
generic <typename T>
where T : Attribute[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetCustomAttributes(System::Reflection::Module ^ element);
public static System.Collections.Generic.IEnumerable<T> GetCustomAttributes<T> (this System.Reflection.Module element) where T : Attribute;
static member GetCustomAttributes : System.Reflection.Module -> seq<'T (requires 'T :> Attribute)> (requires 'T :> Attribute)
<Extension()>
Public Function GetCustomAttributes(Of T As Attribute) (element As Module) As IEnumerable(Of T)
Параметры типа
- T
Тип атрибута для поиска.The type of attribute to search for.
Параметры
- element
- Module
Проверяемый модуль.The module to inspect.
Возвраты
Коллекция настраиваемых атрибутов, которые применяются к element
и соответствуют T
, либо пустая коллекция, если таких атрибутов не существует.A collection of the custom attributes that are applied to element
and that match T
, or an empty collection if no such attributes exist.
Исключения
Свойство element
имеет значение null
.element
is null
.