Reflection

Reflection
ControllerDescriptor, ActionDescriptor, and ParameterDescriptor in ASP.NET MVC

I was working on a method for making controllers, as well as their categories and actions, discoverable, and noticed a few Descriptor types.  On the surface, they appear to provide a few methods and properties that make it much simpler to query information about Controllers and Actions than using Reflection alone.  Obtaining filters, attributes, and even lists of actions from a controller, or lists of parameters from an action, can be made with a simple method call, rather than the possible many lines of using confusing Reflection methods.  However, this isn't exactly the case; the Descriptor types are abstract, their...

posted @ Thursday, February 19, 2009 1:47 PM | Feedback (2)