1 write to _options
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
75_options = new SlidingWindowRateLimiterOptions
24 references to _options
System.Threading.RateLimiting (24)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (24)
43public override bool IsAutoReplenishing => _options.AutoReplenishment; 86_replenishmentPeriod = new TimeSpan(_options.Window.Ticks / _options.SegmentsPerWindow); 94if (_options.AutoReplenishment) 117if (permitCount > _options.PermitLimit) 119throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 152if (permitCount > _options.PermitLimit) 154throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 175Debug.Assert(_options.QueueLimit >= _queueCount); 176if (_options.QueueLimit - _queueCount < permitCount) 178if (_options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst && permitCount <= _options.QueueLimit) 206while (_options.QueueLimit - _queueCount < permitCount); 219Debug.Assert(_queueCount <= _options.QueueLimit); 242if (_queueCount == 0 || (_queueCount > 0 && _options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst)) 267if (_options.AutoReplenishment) 300if (((nowTicks - _lastReplenishmentTick) * TickFrequency) < ReplenishmentPeriod.Ticks && !_options.AutoReplenishment) 309_currentSegmentIndex = (_currentSegmentIndex + 1) % _options.SegmentsPerWindow; 319Debug.Assert(_permitCount <= _options.PermitLimit); 325_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 334_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 344_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 384if (_permitCount == _options.PermitLimit) 411RequestRegistration next = _options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst