public FailingMiddleware(RequestDelegate next, ILogger <FailingMiddleware> logger, FailingOptions options)
 {
     _next     = next;
     _options  = options;
     _mustFail = false;
     _logger   = logger;
 }
        public static IApplicationBuilder UseFailingMiddleware(this IApplicationBuilder builder, Action <FailingOptions> action)
        {
            var options = new FailingOptions();

            action?.Invoke(options);
            builder.UseMiddleware <FailingMiddleware>(options);
            return(builder);
        }