src/Mimp.SeeSharper.Reflection/TypeExtensions.Attribute.cs
/// <summary>
/// Check if <paramref name="type"/> has at least one attribute of <paramref name="attributeType"/>.
/// </summary>
/// <param name="type"></param>
/// <param name="attributeType"></param>
/// <param name="inherit"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
Check if  has at least one attribute of .
Check if has at least one attribute of .
public static bool HasCustomAttribute(this Type type, Type attributeType, bool inherit)
        {
            if (type is null)
                throw new ArgumentNullException(nameof(type));
            if (attributeType is null)
                throw new ArgumentNullException(nameof(attributeType));
            return type.IsDefined(attributeType, inherit);
        }
public static bool HasCustomAttribute ( this Type type , Type attributeType , bool inherit ) { if ( type is null ) throw new ArgumentNullException ( nameof ( type ) ) ; if ( attributeType is null ) throw new ArgumentNullException ( nameof ( attributeType ) ) ; return type . IsDefined ( attributeType , inherit ) ; }
Check if  has at least one attribute of .
Check if has at least one attribute of .
None
None
Type
this
attributeType
Type
None
inherit
bool
None
type
None