public interface ICustomAttributeProvider
|
GetCustomAttributes | Overloaded:GetCustomAttributes(bool inherit) Returns an array of all of the custom attributes defined on this member, excluding named attributes, or an empty array if there are no custom attributes. |
GetCustomAttributes | Overloaded:GetCustomAttributes(Type attributeType, bool inherit) Returns an array of custom attributes defined on this member, identified by type, or an empty array if there are no custom attributes of that type. |
IsDefined | Indicates whether one or more instance of attributeType is defined on this member. |
inherit
Exception Type | Condition |
---|---|
TypeLoadException | The custom attribute type cannot be loaded. |
AmbiguousMatchException | There is more than one attribute of type attributeType defined on this member. |
This method returns custom attributes defined directly on a non-inherited member only.
attributeType
inherit
Exception Type | Condition |
---|---|
TypeLoadException | The custom attribute type cannot be loaded. |
AmbiguousMatchException | There is more than one attribute of type attributeType defined on this member. |
This method returns custom attributes defined directly on a non-inherited member only.
Calling ICustomAttributeProvider.GetCustomAttributes on PropertyInfo or EventInfo when the inherit parameter of GetCustomAttributes is true does not walk the type hierarchy. Use Attribute to inherit custom attributes.
attributeType
inherit