Exemple #1
0
        public ValidateSwaggerRightMiddleware(RequestDelegate next, ValidateSwaggerRightMiddlewareOption option)
        {
            if (null == option)
            {
                throw new ArgumentNullException(nameof(option));
            }

            _next = next ?? throw new ArgumentNullException(nameof(next));

            _option = option;
        }
Exemple #2
0
        public static IApplicationBuilder AddValidateSwaggerRightFor(this IApplicationBuilder app, ValidateSwaggerRightMiddlewareOption option)
        {
            if (null == app)
            {
                throw new ArgumentNullException(nameof(app));
            }

            return(app.UseMiddleware <ValidateSwaggerRightMiddleware>(option));
        }