1 write to _options
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (1)
67_options = new FixedWindowRateLimiterOptions
28 references to _options
System.Threading.RateLimiting (28)
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (28)
39public override bool IsAutoReplenishing => _options.AutoReplenishment; 42public override TimeSpan ReplenishmentPeriod => _options.Window; 80if (_options.AutoReplenishment) 82_renewTimer = new Timer(Replenish, this, _options.Window, _options.Window); 104if (permitCount > _options.PermitLimit) 106throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 140if (permitCount > _options.PermitLimit) 142throw new ArgumentOutOfRangeException(nameof(permitCount), permitCount, SR.Format(SR.PermitLimitExceeded, permitCount, _options.PermitLimit)); 163Debug.Assert(_options.QueueLimit >= _queueCount); 164if (_options.QueueLimit - _queueCount < permitCount) 166if (_options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst && permitCount <= _options.QueueLimit) 194while (_options.QueueLimit - _queueCount < permitCount); 207Debug.Assert(_queueCount <= _options.QueueLimit); 217int replenishWindow = Math.Max(replenishAmount / _options.PermitLimit, 1); 219return new FixedWindowLease(false, TimeSpan.FromTicks(_options.Window.Ticks * replenishWindow)); 239if (_queueCount == 0 || (_queueCount > 0 && _options.QueueProcessingOrder == QueueProcessingOrder.NewestFirst)) 263if (_options.AutoReplenishment) 294if (((nowTicks - _lastReplenishmentTick) * TickFrequency) < _options.Window.Ticks && !_options.AutoReplenishment) 303if (availablePermitCounters >= _options.PermitLimit) 309_permitCount = _options.PermitLimit; 315_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 324_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 333_options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst 371if (_permitCount == _options.PermitLimit) 398RequestRegistration next = _options.QueueProcessingOrder == QueueProcessingOrder.OldestFirst