We know that Razor view engine converts ViewResult(IActionResult) to HTML response which can be sent to users. Below is a picture on Filter pipeline:

My question is, at which stage the Razor view engine will kick in and does the IActionResult to HTML transformation, right after Endpoint finishes execution or right after Resource filters finishes execution?