public static void RegisterConfigurationBundles(this RouteCollection routes)
{
RouteConfigurationSection routesTableSection = GetRouteTableConfigurationSection();
if (routesTableSection == null || routesTableSection.Routes.Count <= 0)
return;
for (int routeIndex = 0; routeIndex < routesTableSection.Routes.Count; routeIndex++)
{
var routeElement = routesTableSection.Routes[routeIndex];
var route = new Route(
routeElement.Url,
GetDefaults(routeElement),
GetConstraints(routeElement),
GetDataTokens(routeElement),
GetInstanceOfRouteHandler(routeElement));
routes.Add(routeElement.Name, route);
}
}