Ejemplo n.º 1
0
 static public T FindCustomAttributeOfType <T>(this IDynamicCustomAttributeProvider item, bool inherit, Predicate <T> predicate) where T : Attribute
 {
     return(item.GetAllCustomAttributesOfType <T>(inherit).FindFirst(predicate));
 }
Ejemplo n.º 2
0
 static public Attribute FindCustomAttributeOfType(this IDynamicCustomAttributeProvider item, Type attribute_type, bool inherit, Predicate <Attribute> predicate)
 {
     return(item.GetAllCustomAttributesOfType(attribute_type, inherit).FindFirst(predicate));
 }
Ejemplo n.º 3
0
 static public bool TryGetCustomAttributeOfType <T>(this IDynamicCustomAttributeProvider item, bool inherit, out T attribute) where T : Attribute
 {
     return(item.GetAllCustomAttributesOfType <T>(inherit).TryGetFirst(out attribute));
 }
Ejemplo n.º 4
0
 static public IEnumerable <T> GetAllCustomAttributesOfType <T>(this IDynamicCustomAttributeProvider item, bool inherit) where T : Attribute
 {
     return(item.GetAllCustomAttributesOfType(typeof(T), inherit).Convert <Attribute, T>());
 }
Ejemplo n.º 5
0
 static public bool TryGetCustomAttributeOfType(this IDynamicCustomAttributeProvider item, Type attribute_type, bool inherit, out Attribute attribute)
 {
     return(item.GetAllCustomAttributesOfType(attribute_type, inherit).TryGetFirst(out attribute));
 }