static public Attribute FindCustomAttribute(this IDynamicCustomAttributeProvider item, bool inherit, Predicate <Attribute> predicate) { return(item.GetAllCustomAttributes(inherit).FindFirst(predicate)); }
static public IEnumerable <Attribute> GetAllCustomAttributesOfType(this IDynamicCustomAttributeProvider item, Type attribute_type, bool inherit) { return(item.GetAllCustomAttributes(inherit).Narrow(a => a.CanObjectBeTreatedAs(attribute_type))); }