示例#1
0
 public static string Action()
 {
     if (AspNetCoreHttpContext.Current != null)
     {
         var action = Url.RouteData("action").ToLower();
         if (!string.IsNullOrEmpty(action))
         {
             return(action);
         }
     }
     return(StackTraces.Method());
 }
示例#2
0
 public static string Action()
 {
     return(RouteTable.Routes.Count != 0 && HttpContext.Current != null
         ? Url.RouteData("action").ToString().ToLower()
         : StackTraces.Method());
 }
示例#3
0
 private static string GetAction()
 {
     return(HasRoute()
         ? Url.RouteData("action").ToString().ToLower()
         : StackTraces.Method());
 }