Exemple #1
0
 public ErrorHandlerMiddleware(
     IExceptionToResponseMapper exceptionToResponseMapper,
     ILogger <ErrorHandlerMiddleware> logger)
 {
     _exceptionToResponseMapper = exceptionToResponseMapper;
     _logger = logger;
 }
 public ExceptionHandlerMiddleware(IExceptionToResponseMapper exceptionToResponseMapper,
                                   ILogger <ExceptionHandlerMiddleware> logger, JsonSerializerOptions serializerOptions)
 {
     _exceptionToResponseMapper = exceptionToResponseMapper;
     _logger            = logger;
     _serializerOptions = serializerOptions;
 }
 public ErrorHandlerMiddleware(RequestDelegate next, ILogger <ErrorHandlerMiddleware> logger,
                               IExceptionToResponseMapper exceptionToResponseMapper)
 {
     _next   = next;
     _logger = logger;
     _exceptionToResponseMapper = exceptionToResponseMapper;
 }
 public ErrorHandlerMiddleware(IExceptionToResponseMapper mapper, ILogger <ErrorHandlerMiddleware> logger)
 {
     _mapper = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 public ErrorHandlerMiddleware(IExceptionToResponseMapper exceptionToResponseMapper)
 {
     _exceptionToResponseMapper = exceptionToResponseMapper;
 }