This is a sample of the pattern for building a MapRoute method that
customizes routing by adding constraints, datatokens, or defaults. This is
the replacement for adding data to the route directly.
Also fixed up the sample to work. It was massively out of date.
This is the routing part of these changes, and just the breaking changes
parts.
Follow-ups will add:
- DataTokens
- Tracking the logical stack of routers
Moving out Default Handler and IInlineConstraintResolver from RouteCollection.
These are moved to a new interface IRouteBuilder, (instead of an IInlineConstraintResolver, it takes in an IServiceProvider).
This means all RouteCollectionExtensions are moved to RouteBuilderExtensions.