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