I have a list of controller names and their actions names. What I need to do is to read values from custom attributes on those actions.
The problem is that it seems there is no easy way to get controller types (Having that the rest is easy.)
ASP.NET MVC framework has this functionality in DefaultControllerFactory
, but it's not accessible outside of framework itself.
It doesn't look like a good idea to reinvent the wheel and implement it myself, especially because MVC framework has cache for controller types, which I would need to duplicate.
Is there any better solution?
Upd. http://stackoverflow.com/questions/790464 describes a similar, but different problem. I don't need to determine what controllers/actions are available to be executed, I need to get type of a single controller.