ActionContext Class¶
Context object for execution of action which has been selected as part of an HTTP request.
- Namespace
Microsoft.AspNetCore.Mvc- Assemblies
- Microsoft.AspNetCore.Mvc.Abstractions
Inheritance Hierarchy¶
System.ObjectMicrosoft.AspNetCore.Mvc.ActionContext
Constructors¶
-
ActionContext()¶ Creates an empty
Microsoft.AspNetCore.Mvc.ActionContext.public ActionContext()
-
ActionContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Routing.RouteData, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor) Creates a new
Microsoft.AspNetCore.Mvc.ActionContext.Arguments: - httpContext (Microsoft.AspNetCore.Http.HttpContext) – The
Microsoft.AspNetCore.Http.HttpContextfor the current request. - routeData (Microsoft.AspNetCore.Routing.RouteData) – The
Microsoft.AspNetCore.Routing.RouteDatafor the current request. - actionDescriptor (Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor) – The
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorfor the selected action.
public ActionContext(HttpContext httpContext, RouteData routeData, ActionDescriptor actionDescriptor)
- httpContext (Microsoft.AspNetCore.Http.HttpContext) – The
-
ActionContext(Microsoft.AspNetCore.Http.HttpContext, Microsoft.AspNetCore.Routing.RouteData, Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary) Creates a new
Microsoft.AspNetCore.Mvc.ActionContext.Arguments: - httpContext (Microsoft.AspNetCore.Http.HttpContext) – The
Microsoft.AspNetCore.Http.HttpContextfor the current request. - routeData (Microsoft.AspNetCore.Routing.RouteData) – The
Microsoft.AspNetCore.Routing.RouteDatafor the current request. - actionDescriptor (Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor) – The
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorfor the selected action. - modelState (Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary) – The
Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.
public ActionContext(HttpContext httpContext, RouteData routeData, ActionDescriptor actionDescriptor, ModelStateDictionary modelState)
- httpContext (Microsoft.AspNetCore.Http.HttpContext) – The
-
ActionContext(Microsoft.AspNetCore.Mvc.ActionContext) Creates a new
Microsoft.AspNetCore.Mvc.ActionContext.Arguments: actionContext (Microsoft.AspNetCore.Mvc.ActionContext) – The Microsoft.AspNetCore.Mvc.ActionContextto copy.public ActionContext(ActionContext actionContext)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ActionContext.ActionDescriptor¶ Gets or sets the
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptorfor the selected action.Return type: Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor public ActionDescriptor ActionDescriptor { get; set; }
-
Microsoft.AspNetCore.Mvc.ActionContext.HttpContext¶ Gets or sets the
Microsoft.AspNetCore.Http.HttpContextfor the current request.Return type: Microsoft.AspNetCore.Http.HttpContext public HttpContext HttpContext { get; set; }
-
Microsoft.AspNetCore.Mvc.ActionContext.ModelState¶ Gets the
Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary.Return type: Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary public ModelStateDictionary ModelState { get; }
-
Microsoft.AspNetCore.Mvc.ActionContext.RouteData¶ Gets or sets the
Microsoft.AspNetCore.Routing.RouteDatafor the current request.Return type: Microsoft.AspNetCore.Routing.RouteData public RouteData RouteData { get; set; }
-