예제 #1
0
 public void InvokeAction(ControllerContext controllerContext, string actionName)
 {
     MethodInfo methodInfo = controllerContext.Controller.GetType().GetMethods().First(m => string.Compare(actionName, m.Name, true) == 0);
     List<object> parameters = new List<object>();
     foreach (ParameterInfo parameter in methodInfo.GetParameters())
     {
         parameters.Add(this.ModelBinder.BindModel(controllerContext, parameter.Name, parameter.ParameterType));
     }
     ActionExecutor executor = new ActionExecutor(methodInfo);
     ActionResult actionResult = (ActionResult)executor.Execute(controllerContext.Controller, parameters.ToArray());
     actionResult.ExecuteResult(controllerContext);
 }
예제 #2
0
 public abstract void ExecuteResult(ControllerContext context);
예제 #3
0
 public override void ExecuteResult(ControllerContext context)
 {
     context.RequestContext.HttpContext.Response.Write(this.RawData);
 }
예제 #4
0
 public override void ExecuteResult(ControllerContext context)
 {
     this.Callback(context.RequestContext.HttpContext.Response.Output);
 }