aspnet/Mvc — pull request #910 by javiercn (2014-08-01 04:37:23+00:00)
Title: [Issue #733] Attribute Routing: Implement Order

Adding 3 commits to this PR as there is no way to send just the last commit. The two previous commits are in separate PRs. I couldn't get to pick just one commit for the PR, so here is everything. The two related PRs are:

#827 and #828

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.