public void Route(Uri uri) { _httpContext.SetRequestUrl("~" + uri.AbsolutePath); RouteData routeData = _routes.GetRouteData(_httpContext); if (routeData != null) { return; } throw new InvalidOperationException("Invalid match URI"); }
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"); }