public static void MapRoute(this RouteCollection routes, string name, string url, object defaults, object constraints, IRouteHandler routeHandler) { var newRoute = new NamedRoute(name, url, routeHandler); newRoute.Defaults = new RouteValueDictionary(defaults); newRoute.Constraints = new RouteValueDictionary(constraints); routes.Add(name, newRoute); }
public static void IgnoreRoute(this RouteCollection routes, string name, string url, object constraints) { var newRoute = new RouteDebugger.Routing.NamedRoute(name, url, new StopRoutingHandler()); routes.Add(name, newRoute); }