/// <summary> /// 格式化当前对结果, 写入到HttpResponse /// </summary> public virtual void Response(HttpContext httpContext, HttpActionContext context) { if (context != null && context.Result != null) httpContext.Response.Write(context.Result); }
/// <summary> /// 执行Action /// </summary> public void ExecuteAction(HttpActionContext context) { Action.Execute(context); }
/// <summary> /// 从HttpContext初始化ActionContext /// </summary> public virtual HttpActionContext GetActionContext(HttpContext httpContext, IAction action) { HttpActionContext Context = new HttpActionContext(); return Context; }
public HttpActionContext(HttpActionContext context) : base(context) { ResponseWrapper = context.ResponseWrapper; }