Exemplo n.º 1
0
        public static void MapRouteLowerCase(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");
            }

            var route = new LowerCaseRoute(url, new MvcRouteHandler())
            {
                Defaults    = RouteValueDictionaryConvertor.Convert(defaults),
                Constraints = RouteValueDictionaryConvertor.Convert(constraints)
            };

            if (String.IsNullOrEmpty(name))
            {
                routes.Add(route);
            }
            else
            {
                routes.Add(name, route);
            }
        }
Exemplo n.º 2
0
 public static RouteValueDictionary Append <T>(object routeValues, string key, T value)
 {
     return(Append(RouteValueDictionaryConvertor.Convert(routeValues), key, value));
 }