1 write to _options
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
74_options = new SlidingWindowRateLimiterOptions
24 references to _options
System.Threading.RateLimiting (24)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (24)
42public override bool IsAutoReplenishing => _options.AutoReplenishment; 85_replenishmentPeriod = new TimeSpan(_options.Window.Ticks / _options.SegmentsPerWindow); 93if (_options.AutoReplenishment) 116if (permitCount > _options.PermitLimit) 118throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 151if (permitCount > _options.PermitLimit) 153throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 174Debug.Assert(_options.QueueLimit >= _queueCount); 175if (_options.QueueLimit - _queueCount < permitCount) 177if (_options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst && permitCount <= _options.QueueLimit) 205while (_options.QueueLimit - _queueCount < permitCount); 218Debug.Assert(_queueCount <= _options.QueueLimit); 241if (_queueCount == 0 || (_queueCount > 0 && _options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst)) 266if (_options.AutoReplenishment) 299if (RateLimiterHelper.GetElapsedTime(_lastReplenishmentTick, nowTicks) < ReplenishmentPeriod && !_options.AutoReplenishment) 308_currentSegmentIndex = (_currentSegmentIndex + 1) % _options.SegmentsPerWindow; 318Debug.Assert(_permitCount <= _options.PermitLimit); 324_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 333_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 343_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 383if (_permitCount == _options.PermitLimit) 410RequestRegistration next = _options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst