3 writes to TokenLimit
RateLimitingSample (1)
Program.cs (1)
28
options.
TokenLimit
= 1;
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
76
TokenLimit
= options.TokenLimit,
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
74
TokenLimit
= options.TokenLimit,
13 references to TokenLimit
System.Threading.RateLimiting (13)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
76
TokenLimit = options.
TokenLimit
,
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (12)
55
if (options.
TokenLimit
<= 0)
57
throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.
TokenLimit
)), nameof(options));
74
TokenLimit = options.
TokenLimit
,
82
_tokenCount = options.
TokenLimit
;
110
if (tokenCount > _options.
TokenLimit
)
112
throw new ArgumentOutOfRangeException(nameof(tokenCount), tokenCount, SR.Format(SR.TokenLimitExceeded, tokenCount, _options.
TokenLimit
));
144
if (tokenCount > _options.
TokenLimit
)
146
throw new ArgumentOutOfRangeException(nameof(tokenCount), tokenCount, SR.Format(SR.TokenLimitExceeded, tokenCount, _options.
TokenLimit
));
300
if (_tokenCount == _options.
TokenLimit
)
317
_tokenCount = Math.Min(_options.
TokenLimit
, _tokenCount + add);
324
Debug.Assert(_tokenCount <= _options.
TokenLimit
);
384
if (_tokenCount == _options.
TokenLimit
)