Esempio n. 1
0
File: App.cs Progetto: ralfw/sammyfx
 public void Run(Request request)
 {
     while (true) {
         var response = this.routerFactory().Handle (request);
         request = Display (response);
     }
 }
Esempio n. 2
0
 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}'!");
 }