public MaxConcurrentRequestsMiddleware(RequestDelegate next, IOptions <MaxConcurrentRequestsOptions> options)
        {
            _concurrentRequestsCount = 0;

            _next    = next ?? throw new ArgumentNullException(nameof(next));
            _options = options?.Value ?? throw new ArgumentNullException(nameof(options));
            //_options.Limit = 20;
            //_options.LimitExceededPolicy = MaxConcurrentRequestsLimitExceededPolicy.FifoQueueDropHead;

            if (_options.LimitExceededPolicy != MaxConcurrentRequestsLimitExceededPolicy.Drop)
            {
                _enqueuer = new MaxConcurrentRequestsEnqueuer(_options.MaxQueueLength, (MaxConcurrentRequestsEnqueuer.DropMode)_options.LimitExceededPolicy, _options.MaxTimeInQueue);
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="MaxConcurrentRequestsMiddleware"/> class.
        /// </summary>
        /// <param name="next">The next.</param>
        /// <param name="options">The options.</param>
        public MaxConcurrentRequestsMiddleware(RequestDelegate next, IOptions <MaxConcurrentRequestsOptions> options)
        {
            Argument.IsNotNull(options.Value, nameof(MaxConcurrentRequestsOptions));
            Argument.IsNotNull(next);

            _concurrentRequestsCount = 0;
            _next    = next;
            _options = options.Value;

            if (_options.LimitExceededPolicy != MaxConcurrentRequestsLimitExceededPolicy.Drop)
            {
                _enqueuer = new MaxConcurrentRequestsEnqueuer(_options.MaxQueueLength, (MaxConcurrentRequestsEnqueuer.DropMode)_options.LimitExceededPolicy, _options.MaxTimeInQueue);
            }
        }