public static IApplicationBuilder UseEventGrid(this IApplicationBuilder app, EventGridOptions proxyOptions)
 {
     proxyOptions.ServiceProvider = app.ApplicationServices;
     return(app.UseMiddleware <EventGridMiddleware>(Options.Create(proxyOptions)));
 }
 public EventGridMiddleware(RequestDelegate next, IOptions <EventGridOptions> options)
 {
     _next       = next;
     _options    = options.Value;
     _eventsPath = _options.EventsPath.TrimStart('/').ToLower();
 }