protected override IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            var values = requestContext.RouteData.Values;

            values["controller"] = RouteHelpers.ProcessUrlPart(values["controller"].ToString());
            values["action"]     = RouteHelpers.ProcessUrlPart(values["action"].ToString());

            return(base.GetHttpHandler(requestContext));
        }
Ejemplo n.º 2
0
        public bool Match(HttpContextBase httpContext, Route route, string parameterName,
                          RouteValueDictionary values, RouteDirection routeDirection)
        {
            var rootMethodNames = typeof(T)
                                  .GetMethods()
                                  .Select(x => x.Name.ToLower())
            ;

            return(rootMethodNames.Contains(
                       RouteHelpers.ProcessUrlPart(values["action"].ToString())));
        }