Esempio n. 1
0
        public static IApplicationBuilder UseFailingMiddleware(this IApplicationBuilder builder, Action <FailingOptions> action)
        {
            var options = new FailingOptions();

            action?.Invoke(options);
            builder.UseMiddleware <FailingMiddleware>(options);
            builder.UseAuthentication();
            return(builder);
        }
Esempio n. 2
0
 public FailingMiddleware(RequestDelegate next, FailingOptions options)
 {
     _next     = next;
     _options  = options;
     _mustFail = false;
 }