static public bool HasCustomAttributeOfSubType <T>(this ICustomAttributeProvider item, Type attribute_type, bool inherit, Predicate <T> predicate) where T : Attribute { if (item.FindCustomAttributeOfSubType <T>(attribute_type, inherit, predicate) != null) { return(true); } return(false); }