Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 05, 2008 07:29 PM by SteveSanderson
Aug 05, 2008 06:40 PM|LINK
Hey all, I need to get your feedback on something. We want to remove the ActionMethod property on Action Filter Contexts, but want to get a sense if that would cause problems for anyone. Most of the information you get from the property is available to you
via the RouteValueDictionary. The reason for the proposed change is we might want to change the mechanism from reflection to something else in the future. By having a property of type MethodInfo there now, we bake that signature into the context. We don't
have time to do the full change we'd like now, so it'd be better if we simply removed the property and added it back later with the proper signature. Any strong objections?
Aug 05, 2008 06:46 PM|LINK
I think that's a no-brainer. Make the switch. It means decoupling yourself from implementation details (ie: getting action name from reflection) and improving the framework. The change on our end would be pretty small.
Given the route values we could always reflect and get our own MethodInfo if we were totally dependent on it.
Aug 05, 2008 06:51 PM|LINK
Aug 05, 2008 06:55 PM|LINK
I see no real need for it. Nuke it.
I am all for breaking changes in future releases if it is for the better.
Aug 05, 2008 07:29 PM|LINK
There is the edge case where you're using a custom ControllerActionInvoker to select action methods, and then you couldn't necessarily determine which action method had been selected just by looking at RouteData. Still, I can't imagine a realistic scenario
where this would be an unsolveable problem.
Sounds like a sensible change to me. No objections!