public static bool HasAttribute <T>(this PropertyInfo pi) => AttributeX.HasAttribute(pi, typeof(T), true); //pi.AllAttributes().Any(x => x.GetType() == typeof(T));
public static bool HasAttribute <T>(this Type type) => AttributeX.HasAttribute(type, typeof(T), true); //type.AllAttributes().Any(x => x.GetType() == typeof(T));