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