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