__Scenario__:
User would like to create domain-specific custom routes or add constraints to a route (_note_: not inline constraint) before its added to the route collection.
__Issue__:
Mvc attribute routing extension currently does not provide a way to supply custom RouteBuilder which can be used to perform the above scenario.
__Reason__:
Creating custom routes (domain specific, for example) or custom constraints seem to be a valid scenario, if not common. I think we should provide a way for end users to do this. Currently Web API's extension accepts a HttpRouteBuilder. Also, we need to provide a consistent user experience across MVC and Web API.
The current extensions on MVC attribute routing are:
public static void MapMvcAttributeRoutes(this RouteCollection routes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IInlineConstraintResolver constraintResolver)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes, IInlineConstraintResolver constraintResolver)
User would like to create domain-specific custom routes or add constraints to a route (_note_: not inline constraint) before its added to the route collection.
__Issue__:
Mvc attribute routing extension currently does not provide a way to supply custom RouteBuilder which can be used to perform the above scenario.
__Reason__:
Creating custom routes (domain specific, for example) or custom constraints seem to be a valid scenario, if not common. I think we should provide a way for end users to do this. Currently Web API's extension accepts a HttpRouteBuilder. Also, we need to provide a consistent user experience across MVC and Web API.
The current extensions on MVC attribute routing are:
public static void MapMvcAttributeRoutes(this RouteCollection routes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IInlineConstraintResolver constraintResolver)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes)
public static void MapMvcAttributeRoutes(this RouteCollection routes, IEnumerable<Type> controllerTypes, IInlineConstraintResolver constraintResolver)