예제 #1
0
        public static string GetName(this Controller controller)
        {
            if (controller == null)
            {
                throw new ArgumentNullException(nameof(controller));
            }

            return(RouteConfiguration.GetControllerName(controller.GetType()));
        }
예제 #2
0
 public static string AsControllerName(this Type controllerType)
 {
     return(RouteConfiguration.GetControllerName(controllerType));
 }
예제 #3
0
 public static string GetName <TOtherController>(this Controller controller)
     where TOtherController : Controller
 {
     return(RouteConfiguration.GetControllerName <TOtherController>());
 }