Closed
Description
I am working on a .NET core implementation of the hypermedia JSONApi standard. I need to generate the hypermedia links, for which I need the route dictionary (to use old terms).
A custom ActionFilterAttribute
is added as a global service, and performs the custom transform on OnActionExecuted
. I want to hand the custom transformer a route collection so that it can work out the URIs to the actions it needs. These actions could be in other controllers not part of the request.
I believe that this will be done by dependency injecting a service (or Application Model?) into the constructor but I cannot find the relevant service to inject.
How do I get the route collection in the action filter?
Thank you!