interface ICustomAttributeProvider

in global :: System . Reflection

Provides custom attributes for reflection objects that support them.


public 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.

  • inherit When , look up the hierarchy chain for the inherited custom attribute.
  • Returns An array of Objects representing custom attributes, or an empty array.

public 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.

  • attributeType The type of the custom attributes.
  • inherit When , look up the hierarchy chain for the inherited custom attribute.
  • Returns An array of Objects representing custom attributes, or an empty array.

public bool IsDefined( Type attributeType, bool inherit )

Indicates whether one or more instance of is defined on this member.

  • attributeType The type of the custom attributes.
  • inherit When , look up the hierarchy chain for the inherited custom attribute.
  • Returns if the is defined on this member; otherwise.