Exemplo n.º 1
0
        public static IApplicationBuilder UseSimpleIdentityServerManagerExceptionHandler(
            this IApplicationBuilder applicationBuilder,
            ExceptionHandlerMiddlewareOptions options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            return(applicationBuilder.UseMiddleware <ExceptionHandlerMiddleware>(options));
        }
Exemplo n.º 2
0
        public ExceptionHandlerMiddleware(
            RequestDelegate next,
            ExceptionHandlerMiddlewareOptions options)
        {
            if (next == null)
            {
                throw new ArgumentNullException(nameof(next));
            }

            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            _next    = next;
            _options = options;
        }