Esempio n. 1
0
 /// <summary>
 /// The job of this method is invoke an action and ultimately populate the 
 /// </summary>
 /// <param name="application">The current application</param>
 /// <param name="context">A context which stores the request and response contexts.</param>
 public async Task Execute(MvcApplication application, NavigationContext context)
 {
     Initialize(application, context);
     var action = RouteData.Action;
     var actionResult = await ActionInvoker.InvokeAction(ControllerContext, action);
     var view = ((ViewResult)actionResult).View;
     view.Initialize(application.CreateViewContext(this));
     context.Response.View = view;
 }
Esempio n. 2
0
 public MvcApplication()
 {
     instance           = this;
     DependencyResolver = new ReflectionDependencyResolver();
 }
Esempio n. 3
0
 public MvcApplication()
 {
     instance = this;
     DependencyResolver = new ReflectionDependencyResolver();
 }
Esempio n. 4
0
 protected virtual void Initialize(MvcApplication application, NavigationContext requestContext)
 {
     NavigationContext = requestContext;
     ActionInvoker = new ControllerActionInvoker();
     ControllerContext = new ControllerContext { Application = application, NavigationContext = NavigationContext, Controller = this };
 }