public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, List<string> subDomains, List<string> domains, string url, object defaults) { SubdomainRoute route = new SubdomainRoute( subDomains, domains, url, new RouteValueDictionary(defaults), new MvcRouteHandler()); routes.Add(name, route); return route; }
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, List<string> domains, string url, object defaults, object constraints) { SubdomainRoute route = new SubdomainRoute( subDomains, domains, url, new RouteValueDictionary(defaults), new RouteValueDictionary(constraints), new RouteValueDictionary(new {Area = context.AreaName}), new MvcRouteHandler()); context.Routes.Add(name, route); return route; }