Пример #1
0
        internal static Controller RunNoAccessAction(ControllerAction controllerAction)
        {
            WebAppContext.Response.DisableCaching();

            ControllerClass controllerClass = controllerAction.ControllerClass;

            using (Controller controller = controllerClass.CreateController())
            {
                controller.NoAccess(controllerAction);
                return(controller);
            }
        }
Пример #2
0
        internal static Controller RunControllerAction(ControllerAction controllerAction)
        {
            WebAppContext.Response.DisableCaching();

            ControllerClass controllerClass = controllerAction.ControllerClass;

            using (Controller controller = controllerClass.CreateController())
            {
                if (controllerClass.Run(controller, controllerAction.Method))
                {
                    return(controller);
                }
                else
                {
                    return(null);
                }
            }
        }