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