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)
75
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)
56
if (options.
TokenLimit
<= 0)
58
throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.
TokenLimit
)), nameof(options));
75
TokenLimit = options.
TokenLimit
,
83
_tokenCount = options.
TokenLimit
;
111
if (tokenCount > _options.
TokenLimit
)
113
throw new ArgumentOutOfRangeException(nameof(tokenCount), tokenCount, SR.Format(SR.TokenLimitExceeded, tokenCount, _options.
TokenLimit
));
145
if (tokenCount > _options.
TokenLimit
)
147
throw new ArgumentOutOfRangeException(nameof(tokenCount), tokenCount, SR.Format(SR.TokenLimitExceeded, tokenCount, _options.
TokenLimit
));
301
if (_tokenCount == _options.
TokenLimit
)
318
_tokenCount = Math.Min(_options.
TokenLimit
, _tokenCount + add);
325
Debug.Assert(_tokenCount <= _options.
TokenLimit
);
385
if (_tokenCount == _options.
TokenLimit
)