You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
We still have some IActionResult classes like ViewComponentResult that have a lot of implementation code in their execute method, including calls to GetRequiredService. We should review these and change them to be more like ViewResult.
The text was updated successfully, but these errors were encountered:
I've gone through all the action results and I've examined what to do on each individual action result. My criteria for adding facades has been the following. The ActionResult is part of a "Result Hierarchy" like file related results (and one or more of them require more than one dependency from DI). There is a reasonable amount of code in the action result Execute* method.
In general I've left untouched the action results that just resolve a logger factory and do small work on the execute* method.
BadRequestObjectResult -> No changes required
BadRequestResult -> No changes required
ChallengeResult -> Not adding a facade for this, it just uses context.HttpContext.Authentication
ContentResult -> Not adding a facade for this, we might want to remove the buffering feature related code.
CreatedAtRouteResult -> Does an extra call to GetRequiredService, but they are hard to change due to the current layering, we can leave them as they are right now.
CreatedResult -> Does an extra call to GetRequiredService, but they are hard to change due to the current layering, we can leave them as they are right now.
EmptyResult -> No changes required
FileContentResult -> Added a facade for it
FileStreamResult -> Added a facade for it.
ForbidResult -> Not adding a facade for this, it just uses context.HttpContext.Authentication.
LocalRedirectResult -> Added a facade for it.
NoContentResult -> No changes required
NotFoundObjectResult -> No changes required
NotFoundResult -> No changes required
ObjectResult -> Already has a facade
OkObjectResult -> No changes required
OkResult -> No changes required
PhysicalFileResult -> Added a facade for it, removed the extensibility points on the result as they were meant for code reuse (which is now on the executor) and for unit testing.
We still have some
IActionResult
classes likeViewComponentResult
that have a lot of implementation code in their execute method, including calls toGetRequiredService
. We should review these and change them to be more likeViewResult
.The text was updated successfully, but these errors were encountered: