public void Run(Request request) { while (true) { var response = this.routerFactory().Handle (request); request = Display (response); } }
public Response Handle(Request request) { if (this.handlers.ContainsKey (request.Route)) return this.handlers [request.Route.ToLower ()] (request); else throw new InvalidOperationException ($"No route handler for '{request.Route}'!"); }