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