Exemple #1
0
        public void Route(Uri uri)
        {
            _httpContext.SetRequestUrl("~" + uri.AbsolutePath);

            RouteData routeData = _routes.GetRouteData(_httpContext);

            if (routeData != null)
            {
                return;
            }

            throw new InvalidOperationException("Invalid match URI");
        }
Exemple #2
0
        public void Route(Uri uri)
        {
            _httpContext.SetRequestUrl("~" + uri.AbsolutePath);

            RouteData routeData = _routes.GetRouteData(_httpContext);

            if (routeData != null)
            {
                var s = (string)routeData.Values["controller"];
                if (_matches.ContainsKey(s))
                {
                    return;
                }
            }

            throw new InvalidOperationException("Invalid match URI");
        }