EGSW.Web.LocalizedRouteExtensionMethod.MapLocalizedRoute C# (CSharp) Method

MapLocalizedRoute() public static method

public static MapLocalizedRoute ( this routes, string name, string url, object defaults, object constraints, string namespaces ) : Route
routes this
name string
url string
defaults object
constraints object
namespaces string
return System.Web.Routing.Route
        public static Route MapLocalizedRoute(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");
            }

            var route = new clsRouteData(url, new MvcRouteHandler())
            {
                Defaults = new RouteValueDictionary(defaults),
                Constraints = new RouteValueDictionary(constraints),
                DataTokens = new RouteValueDictionary()
            };

            if ((namespaces != null) && (namespaces.Length > 0))
            {
                route.DataTokens["Namespaces"] = namespaces;
            }

            routes.Add(name, route);

            return route;
        }

Same methods

LocalizedRouteExtensionMethod::MapLocalizedRoute ( this routes, string name, string url, object defaults, string namespaces ) : Route
LocalizedRouteExtensionMethod