示例#1
0
 static bool ActionAcceptsMethod(ActionDescriptor action, string method) =>
 action.GetHttpMethods().Contains(method, StringComparer.OrdinalIgnoreCase);
示例#2
0
 public static string GetHttpMethod(this ActionDescriptor actionDescriptor)
 {
     return(actionDescriptor
            .GetHttpMethods()
            .Single());
 }