Example #1
0
        public SimulatorActionInvoker(IMvcApplication mvcApplication, ActionExecutionContext actionExecutionContext)
        {
            _filterInfo = mvcApplication.GetFilterInfo(actionExecutionContext.ControllerContext,
                                                       actionExecutionContext.ActionDescriptor);

            _mvcApplication         = mvcApplication;
            _actionExecutionContext = actionExecutionContext;
        }
        public SimulatorActionInvoker(IMvcApplication mvcApplication, ActionExecutionContext actionExecutionContext)
        {
            _filterInfo = mvcApplication.GetFilterInfo(actionExecutionContext.ControllerContext,
                actionExecutionContext.ActionDescriptor);

            _mvcApplication = mvcApplication;
            _actionExecutionContext = actionExecutionContext;
        }
 public virtual ActionResult GetAuthorizationResult(ActionExecutionContext executionContext)
 {
     return GetActionInvoker(executionContext).GetAuthorizationResult();
 }
 private SimulatorActionInvoker GetActionInvoker(ActionExecutionContext actionExecutionContext)
 {
     return new SimulatorActionInvoker(MvcApplication, actionExecutionContext);
 }
 public virtual ActionResult GetActionResult(ActionExecutionContext actionExecutionContext)
 {
     var invoker = GetActionInvoker(actionExecutionContext);
     return invoker.GetActionResult();
 }
 public virtual ModelStateDictionary ValidateRequest(ActionExecutionContext executionContext)
 {
     return GetActionInvoker(executionContext).ValidateRequest();
 }
        public virtual ActionResult GetActionResult(ActionExecutionContext actionExecutionContext)
        {
            var invoker = GetActionInvoker(actionExecutionContext);

            return(invoker.GetActionResult());
        }
 internal ControllerActionInvokerSimulator GetActionInvoker(ActionExecutionContext actionExecutionContext)
 {
     return(new ControllerActionInvokerSimulator(MvcApplication, actionExecutionContext));
 }
 public virtual ModelStateDictionary ValidateRequest(ActionExecutionContext executionContext)
 {
     return(GetActionInvoker(executionContext).ValidateRequest());
 }
 public virtual ActionResult GetAuthorizationResult(ActionExecutionContext executionContext)
 {
     return(GetActionInvoker(executionContext).GetAuthorizationResult());
 }
Example #11
0
 public ViewResultSimulator(ActionExecutionContext executionContext, IVirtualContent virtualContent, TModel model)
 {
     _executionContext = executionContext;
     _virtualContent   = virtualContent;
     _model            = model;
 }
Example #12
0
 public static ViewResultSimulator <TModel> View <TModel>(this DirectControllerAction controllerAction, ActionExecutionContext executionContext, IVirtualContent virtualContent, TModel model)
 {
     return(new ViewResultSimulator <TModel>(executionContext, virtualContent, model));
 }
Example #13
0
 public static void ExecuteResult(this ActionResult actionResult, ActionExecutionContext executionContext)
 {
     new ControllerActionInvokerSimulator(executionContext.MvcApplication, executionContext)
     .InvokeActionResult(actionResult);
 }