System.Web.Routing.RouteCollectionExtensions.RegisterConfigurationBundles C# (CSharp) Method

RegisterConfigurationBundles() public static method

public static RegisterConfigurationBundles ( this routes ) : void
routes this
return void
        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);
            }
        }