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