Esempio n. 1
0
 static public T FindCustomAttributeOfSubType <T>(this ICustomAttributeProvider item, Type attribute_type, bool inherit, Predicate <T> predicate) where T : Attribute
 {
     return(item.GetAllCustomAttributesOfSubType <T>(attribute_type, inherit).FindFirst(predicate));
 }
Esempio n. 2
0
 static public bool TryGetCustomAttributeOfSubType <T>(this ICustomAttributeProvider item, Type attribute_type, bool inherit, out T attribute) where T : Attribute
 {
     return(item.GetAllCustomAttributesOfSubType <T>(attribute_type, inherit).TryGetFirst(out attribute));
 }