Commit Graph

4 Commits

Author SHA1 Message Date
Ryan Nowak 3cd6d3e060 Adding Api Explorer 2014-09-25 15:31:51 -07:00
jacalvar 775a780f49 [Fixes #739] Attribute Routing: Multiple routes per-action
1. Support multiple [Http*] attributes on an action.
2. Support multiple [Route] attributes on a controller and on an action.
3. Support creating multiple attribute routes using [AcceptVerbs("...", Route = "...")]
4. Detect attribute routed actions during action discovery and return one action per [Http*],
   [Route] or [AcceptVerbs] attribute found on the method when there is at least one valid attribute route.
5. Merge all the HTTP methods of [Http*] and [AcceptVerbs] attributes in a method during
   action discovery when there are no valid attribute routes defined on the action.
6. Build one action descriptor per controller [Route] + action [Http*], [AcceptVerbs]
   or [Route] combination in an action.
7. Disallow the use of attributes that do not implement IActionHttpMethodProvider and
   IRouteTemplateProvider simultaneously in methods that define attribute routed
   actions and throw an exception during startup.
8. Disallow mixing attribute routed and non attribute routed actions on the same method
   and throw an exception during startup.
2014-09-12 14:43:19 -07:00
Javier Calvarro Nelson 21b1174d76 [Issue #730] Attribute Routing: Flesh out attributes - Part 1
1. Added a new AttributeRouteInfo class to store all the information for
   actions that are attribute routed.

2. Added a new ReflectedAttributeRouteModel class to store all the information
   related to attribute routes in the ReflectedApplicationModel.

3. Refactored ReflectedControllerModel and ReflectedActionModel to use ReflectedAttributeRouteModel
   instead of just the attribute route template.

4. Refactored ReflectedActionDescriptorProvider to use AttributeRouteInfo and ReflectedAttributeRouteModel
   instead of just the route template.

5. Added a CombineReflectedAttributeRouteModel method in ReflectedAttributeRouteModel that handles
   combining two ReflectedAttributeRouteModel instances.

6. Removed the AttributeRouteTemplate class and moved the methods for combining attribute routes to the
   ReflectedAttributeRouteModel class.

7. Added unit tests for ReflectedActionModel and  ReflectedControllerModel that
   cover the usage of AttributeRouteInfo.

8. Added unit tests for CombineReflectedAttributeRouteModel.
2014-08-14 11:21:01 -07:00
Ryan Nowak e6ba1f23a2 refactor of action descriptor pipeline
(cherry picked from commit 634f756e7fd303fc3022563fcd8fb9b1cb47fba2)
2014-06-20 11:11:08 -07:00