Ejemplo n.º 1
0
        public static IApplicationBuilder UseBusinessException(this IApplicationBuilder builder, Action <BusinessExceptionOption> options)
        {
            var o = new BusinessExceptionOption();

            options.Invoke(o);
            return(builder.UseMiddleware <BusinessExceptionMiddleware>(Options.Create(o)));
        }
Ejemplo n.º 2
0
 public BusinessExceptionMiddleware(RequestDelegate next, ILogger <BusinessExceptionMiddleware> logger, IOptions <BusinessExceptionOption> options)
 {
     _next    = next;
     _logger  = logger;
     _options = options.Value;
 }