Esempio 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)));
        }
Esempio n. 2
0
 public BusinessExceptionMiddleware(RequestDelegate next, ILogger <BusinessExceptionMiddleware> logger, IOptions <BusinessExceptionOption> options)
 {
     _next    = next;
     _logger  = logger;
     _options = options.Value;
 }