--
/*
MvcRouteHander 中有使用到:
var actionContext = new ActionContext(context.HttpContext, context.RouteData, actionDescriptor);
*/
public class ActionContext
{
public ActionContext([NotNull] ActionContext actionContext)
: this(actionContext.HttpContext, actionContext.RouteData, actionContext.ActionDescriptor)
{
ModelState = actionContext.ModelState;
}
public ActionContext([NotNull] RouteContext routeContext, [NotNull] ActionDescriptor actionDescriptor)
: this(routeContext.HttpContext, routeContext.RouteData, actionDescriptor)
{
}
public ActionContext([NotNull] HttpContext httpContext,
[NotNull] RouteData routeData,
[NotNull] ActionDescriptor actionDescriptor)
{
HttpContext = httpContext;
RouteData = routeData;
ActionDescriptor = actionDescriptor;
ModelState = new ModelStateDictionary();
}
public HttpContext HttpContext { get; private set; }
public RouteData RouteData { get; private set; }
public ModelStateDictionary ModelState { get; private set; }
public ActionDescriptor ActionDescriptor { get; private set; }
}
浙公网安备 33010602011771号