コード例 #1
0
 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);
 }
コード例 #2
0
 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);
 }