Пример #1
0
 public HandleCustomError(IExceptionHandlerFactory exceptionHandlerFactory)
 {
     _exceptionHandlerFactory = exceptionHandlerFactory;
 }
Пример #2
0
 public ExceptionHandlingMiddleware(RequestDelegate next,
                                    IExceptionHandlerFactory factory)
 {
     _next    = next;
     _factory = factory;
 }
Пример #3
0
        public static void RegisterGlobalFilters(GlobalFilterCollection filters, IExceptionHandlerFactory exceptionHandlerFactory)
        {
            filters.Add(new HandleCustomError(exceptionHandlerFactory));
//            filters.Add(new HandleErrorAttribute());
        }
Пример #4
0
 public ExceptionHandlingFacade(IExceptionHandlerFactory exceptionHandlerFactory)
 {
     fExceptionHandlerFactory = exceptionHandlerFactory;
 }
 public ExceptionHandlingFacadeTest()
 {
     fExceptionHandlerFactory = Substitute.For <IExceptionHandlerFactory>();
 }
Пример #6
0
 public ExceptionHandlerMiddleware(IExceptionHandlerFactory exceptionHandlerFactory, RequestDelegate next)
 {
     _next = next ?? throw new ArgumentNullException(nameof(next));
     _exceptionHandlerFactory = exceptionHandlerFactory ?? throw new ArgumentNullException(nameof(exceptionHandlerFactory));
 }