1. Added support for Name in attribute routing. Name can be defined using [RouteAttribute]
and the different Http*Attributes, for example [HttpGet].
2. Names defined on actions always override names defined on the controller.
3. Actions with a non empty template don't inherit the name from the controller. The name
is only inherited from the controller when the action template is null or empty.
4. Multiple attribute routes with different templates and the same name are not allowed.
1. Added an Order property to IRouteTemplateProvider, ReflectedAttributeRouteModel,
AttributeRouteInfo, AttributeRouteLinkGenerationEntry and AttributeRouteMatchingEntry.
2. Changed the implementation of AttributeRoute to take the order into account when routing
incomming requests and generating links.
3. Ensured a stable ordering of route entries with the same order and precedence for route
matching and link generation based on the template text.
4. Added tests to validate that the precedence gets respected in route matching and link generation.
5. Added tests to validate that the order gets respected in route matching and link generation.
6. Added tests to validate that the order gets respected over the precedence for route matching
and link generation.
7. Added tests to validate that routes with the same order and precedence expose a stable ordering
for route matching and link generation.
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.
This change allows a user to override a route prefix set using
[Route("...")] on the controller by providing a route template
on the action that starts with "~/" or "/". For example,
[HttpGet("~/...")] or [HttpGet("/...")]
If the user specifies a template in [Route] that starts with "~/"
or "/", we will just strip the prefix from the template and use
the remaining part of the template.
The reason to do this is that there's a reasonable extensibility
scenario where a user can implement a global prefix for routes as
a convention (using IReflectedApplicationModelConvention), and use
~/ to escape that prefix (just like we support with action-level routes).