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