public IObservable <IUrlResponse> GetResponse(IRoutingContext context) { // we get the route handler from the resource locator IRouteHandler _routeHandler = null; if (!ResourceLocator.TryGetResource <IRouteHandler>(_url, out _routeHandler)) { // we return that the handler was not found var _observer = new LazyRelayObservable <IUrlResponse>((s) => { s.OnNext(new UrlResponse(context.Request, ResponseStatus.HandlerNotFound, null, null)); s.OnCompleted(); }); return(_observer); } // we we resolve return(_routeHandler.GetResponse(context)); }