public static LowerCaseUrlRoute MapLowerCaseUrlRoute(this AreaRegistrationContext context, string name, string url, object defaults, object constraints, string[] namespaces)
        {
            if ((namespaces == null) && (context.Namespaces != null))
            {
                namespaces = context.Namespaces.ToArray <string>();
            }
            LowerCaseUrlRoute route = context.Routes.MapLowerCaseUrlRoute(name, url, defaults, constraints, namespaces);

            route.DataTokens["area"] = context.AreaName;
            bool flag = (namespaces == null) || (namespaces.Length == 0);

            route.DataTokens["UseNamespaceFallback"] = flag;
            return(route);
        }
 public static LowerCaseUrlRoute MapLowerCaseUrlRoute(this RouteCollection routes, string name, string url, object defaults, object constraints, string[] namespaces)
 {
     if (routes == null)
     {
         throw new ArgumentNullException("routes");
     }
     if (url == null)
     {
         throw new ArgumentNullException("url");
     }
     LowerCaseUrlRoute route2 = new LowerCaseUrlRoute(url, new MvcRouteHandler());
     route2.Defaults = new RouteValueDictionary(defaults);
     route2.Constraints = new RouteValueDictionary(constraints);
     route2.DataTokens = new RouteValueDictionary();
     LowerCaseUrlRoute item = route2;
     if ((namespaces != null) && (namespaces.Length > 0))
     {
         item.DataTokens["Namespaces"] = namespaces;
     }
     routes.Add(name, item);
     return item;
 }
        public static LowerCaseUrlRoute MapLowerCaseUrlRoute(this RouteCollection routes, string name, string url, object defaults, object constraints, string[] namespaces)
        {
            if (routes == null)
            {
                throw new ArgumentNullException("routes");
            }
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            LowerCaseUrlRoute route2 = new LowerCaseUrlRoute(url, new MvcRouteHandler());

            route2.Defaults    = new RouteValueDictionary(defaults);
            route2.Constraints = new RouteValueDictionary(constraints);
            route2.DataTokens  = new RouteValueDictionary();
            LowerCaseUrlRoute item = route2;

            if ((namespaces != null) && (namespaces.Length > 0))
            {
                item.DataTokens["Namespaces"] = namespaces;
            }
            routes.Add(name, item);
            return(item);
        }