예제 #1
0
 // ToDO use OWIN?
 private static async Task MarvinHttpHandler(HttpContext c, IMarvinEndpointHandler innerHandler)
 {
     if (innerHandler is IMarvinEndpointGetHandler)
     {
         await c.Response.WriteAsync(await ((IMarvinEndpointGetHandler)innerHandler).Handle());
     }
 }
예제 #2
0
 public MarvinEndpoint(string path, string description, IMarvinEndpointHandler handler)
 {
     Path        = path;
     Description = description;
     Handler     = handler;
 }