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.Object
Microsoft.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.HttpContext
for the current request. - routeData (Microsoft.AspNetCore.Routing.RouteData) – The
Microsoft.AspNetCore.Routing.RouteData
for the current request. - actionDescriptor (Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor) – The
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor
for 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.HttpContext
for the current request. - routeData (Microsoft.AspNetCore.Routing.RouteData) – The
Microsoft.AspNetCore.Routing.RouteData
for the current request. - actionDescriptor (Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor) – The
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor
for 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.ActionContext
to copy.public ActionContext(ActionContext actionContext)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ActionContext.
ActionDescriptor
¶ Gets or sets the
Microsoft.AspNetCore.Mvc.Abstractions.ActionDescriptor
for 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.HttpContext
for 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.RouteData
for the current request.Return type: Microsoft.AspNetCore.Routing.RouteData public RouteData RouteData { get; set; }
-