Exemple #1
0
        public static IApplicationBuilder UseApiExceptionMiddleware(this IApplicationBuilder app, Action <ApiExceptionMiddlewareOptions> configureOptions)
        {
            var options = new ApiExceptionMiddlewareOptions();

            configureOptions(options);
            return(app.UseMiddleware <ApiExceptionMiddleware>(options));
        }
 public ApiExceptionMiddleware(RequestDelegate next, ApiExceptionMiddlewareOptions options)
 {
     _next    = next;
     _options = options;
 }