public ActionResult Index() { MyAsyncControllerActionInvoker actionInvoker = new MyAsyncControllerActionInvoker(); Dictionary<ActionDescriptor, ActionResult> actionResults = new Dictionary<ActionDescriptor, ActionResult>(); ControllerDescriptor controllerDescriptor = actionInvoker.GetControllerDescriptor(this.ControllerContext); string[] actions = new string[] { "Foo", "Bar", "Baz", "Qux" }; Array.ForEach(actions, action => { ActionDescriptor actionDescriptor = controllerDescriptor.FindAction(ControllerContext, action); ActionResult actionResult = actionInvoker.InvokeActionMethod(this.ControllerContext, actionDescriptor, new Dictionary<string, object>()); actionResults.Add(actionDescriptor, actionResult); }); return View(actionResults); }
public ActionResult Index() { MyAsyncControllerActionInvoker actionInvoker = new MyAsyncControllerActionInvoker(); Dictionary <ActionDescriptor, ActionResult> actionResults = new Dictionary <ActionDescriptor, ActionResult>(); ControllerDescriptor controllerDescriptor = actionInvoker.GetControllerDescriptor(this.ControllerContext); string[] actions = new string[] { "Foo", "Bar", "Baz", "Qux" }; Array.ForEach(actions, action => { ActionDescriptor actionDescriptor = controllerDescriptor.FindAction(ControllerContext, action); ActionResult actionResult = actionInvoker.InvokeActionMethod(this.ControllerContext, actionDescriptor, new Dictionary <string, object>()); actionResults.Add(actionDescriptor, actionResult); }); return(View(actionResults)); }