ActionExecutedContextResult
The **ActionExecutedContextResult** is a class in the ASP.NET Core framework, specifically within the **Microsoft.AspNetCore.Mvc** namespace, used to encapsulate the result of an executed action in an MVC or Web API application. It serves as a container for information about the action execution process, including details about the executed action, any exceptions that may have occurred, and the final outcome of the request.
This class is typically utilized within middleware components or custom action filters to inspect the results
Key properties of **ActionExecutedContextResult** include:
- **Result**: The final result object returned by the executed action, such as an **ActionResult** or **ObjectResult**,
- **Exception**: If an unhandled exception occurred during action execution, this property contains the exception object.
- **ExecutingTask**: A task representing the asynchronous execution of the action, allowing for further inspection or manipulation
- **HttpContext**: The original **HttpContext** object associated with the request, providing access to request and response details.
Developers often use **ActionExecutedContextResult** in middleware to perform post-processing tasks, such as logging, analytics, or modifying