Exemple #1
0
		public static Route MapLowercaseRoute(this RouteCollection routes, string name, string url, object defaults, object constraints)
		{
			if (routes == null)
				throw new ArgumentNullException("routes");
			if (url == null)
				throw new ArgumentNullException("url");
			LowercaseRoute route = new LowercaseRoute(url, new MvcRouteHandler())
			{
				Defaults = new RouteValueDictionary(defaults),
				Constraints = new RouteValueDictionary(constraints),
				DataTokens = new RouteValueDictionary()
			};
			routes.Add(name, route);
			return route;
		}
Exemple #2
0
        public static Route MapLowercaseRoute(this RouteCollection routes, string name, string url, object defaults, object constraints)
        {
            if (routes == null)
            {
                throw new ArgumentNullException("routes");
            }
            if (url == null)
            {
                throw new ArgumentNullException("url");
            }
            LowercaseRoute route = new LowercaseRoute(url, new MvcRouteHandler())
            {
                Defaults    = new RouteValueDictionary(defaults),
                Constraints = new RouteValueDictionary(constraints),
                DataTokens  = new RouteValueDictionary()
            };

            routes.Add(name, route);
            return(route);
        }