Inheritance: System.Web.Mvc.ControllerContext
Ejemplo n.º 1
0
        public override void ExecuteFormat(Type type, object returnValue, FormatterContext formatterContext)
        {
            IViewSelector viewSelector = GlobalConfiguration.Configuration.Services.GetViewSelector();

            var view = viewSelector.SelectView(new ViewLocationContext(formatterContext)
            {
                ActionDescriptor = formatterContext.ActionDescriptor,
                ReturnType = type
            });

            if (returnValue != null)
            {
                view.ViewData.Model = returnValue;
            }

            view.ExecuteResult(formatterContext);
        }
Ejemplo n.º 2
0
 public abstract void ExecuteFormat(Type type, object returnValue, FormatterContext formatterContext);
Ejemplo n.º 3
0
 public override void ExecuteFormat(Type type, object returnValue, FormatterContext formatterContext)
 {
     this.WriteToStream(type, returnValue, formatterContext.HttpContext.Response.OutputStream, formatterContext.Request);
 }