Exemple #1
0
 public T GetActionOrHandlerAttribute <T>() where T : Attribute
 {
     return(MethodDescriptor.GetAttribute <T>() ?? HandlerTypeDescriptor.GetAttribute <T>());
 }
Exemple #2
0
 public IEnumerable <T> GetActionOrHandlerAttributes <T>() where T : Attribute
 {
     return(MethodDescriptor.GetAttributes <T>()
            .Union(HandlerTypeDescriptor.GetAttributes <T>()));
 }
Exemple #3
0
 public bool HasActionOrHandlerAttribute <T>() where T : Attribute
 {
     return(MethodDescriptor.HasAttribute <T>() || HandlerTypeDescriptor.HasAttribute <T>());
 }