Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
interface System.​Reflection.​ICustomAttributeProvider
Assembly: System.Runtime
Provides custom attributes for reflection objects that support them.
Methods
object[]
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.
Returns An array of Objects representing custom attributes, or an empty array.
inherit
When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.
object[]
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.
Returns An array of Objects representing custom attributes, or an empty array.
attributeType
The type of the custom attributes.
inherit
When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.
bool
IsDefined​(Type attributeType,
bool inherit)
Indicates whether one or more instance of <paramref name="attributeType" /> is defined on this member.
Returns <see langword="true" /> if the <paramref name="attributeType" /> is defined on this member; <see langword="false" /> otherwise.
attributeType
The type of the custom attributes.
inherit
When <see langword="true" /> , look up the hierarchy chain for the inherited custom attribute.