<PackageReference Include="Castle.Core" Version="5.1.1" />

AttributesUtil

public static class AttributesUtil
Helper class for retrieving attributes.
public static T GetAttribute<T>(this Type type) where T : Attribute

Gets the attribute.

public static T GetAttribute<T>(this MemberInfo member) where T : Attribute

Gets the attribute.

public static IEnumerable<T> GetAttributes<T>(this Type type) where T : Attribute

Gets the attributes. Does not consider inherited attributes!

public static IEnumerable<T> GetAttributes<T>(this MemberInfo member) where T : Attribute

Gets the attributes. Does not consider inherited attributes!

public static AttributeUsageAttribute GetAttributeUsage(this Type attributeType)

public static T GetTypeAttribute<T>(this Type type) where T : Attribute

Gets the type attribute.

public static T[] GetTypeAttributes<T>(Type type) where T : Attribute

Gets the type attributes.

public static Type GetTypeConverter(MemberInfo member)

Gets the type converter.