Class CustomAttribute
Contains static methods for retrieving custom attributes.
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.dll
Syntax
public static class CustomAttribute
Methods
| Edit this page View SourceIsDefined<TAttribute>(ICustomAttributeProvider, bool)
Indicates whether one or more attributes of the specified type or of its derived types is applied to the member.
Declaration
public static bool IsDefined<TAttribute>(this ICustomAttributeProvider member, bool inherit = false) where TAttribute : Attribute
Parameters
Type | Name | Description |
---|---|---|
ICustomAttributeProvider | member | The member to inspect. |
bool | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
Type | Description |
---|---|
bool | true if one or more instances of |
Type Parameters
Name | Description |
---|---|
TAttribute | The type of custom attribute to search for. The search includes derived types. |