1 instantiation of TokenBucketRateLimiter
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
84
return new
TokenBucketRateLimiter
(options);
18 references to TokenBucketRateLimiter
Microsoft.AspNetCore.RateLimiting (1)
RateLimiterOptionsExtensions.cs (1)
15
/// Registers a new <see cref="
TokenBucketRateLimiter
"/> with the given <see cref="TokenBucketRateLimiterOptions"/> to the application.
System.Threading.RateLimiting (17)
System\Threading\RateLimiting\MetadataName.cs (1)
13
/// For example, used in <see cref="
TokenBucketRateLimiter
"/> which periodically replenishes leases.
System\Threading\RateLimiting\RateLimitPartition.cs (1)
55
/// Defines a partition with a <see cref="
TokenBucketRateLimiter
"/> with the given <see cref="TokenBucketRateLimiterOptions"/>.
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (8)
47
/// Initializes the <see cref="
TokenBucketRateLimiter
"/>.
49
/// <param name="options">Options to specify the behavior of the <see cref="
TokenBucketRateLimiter
"/>.</param>
280
TokenBucketRateLimiter
limiter = (state as
TokenBucketRateLimiter
)!;
433
throw new ObjectDisposedException(nameof(
TokenBucketRateLimiter
));
477
public RequestRegistration(int permitCount,
TokenBucketRateLimiter
limiter, CancellationToken cancellationToken)
501
var
limiter = (
TokenBucketRateLimiter
)registration.Task.AsyncState!;
System\Threading\RateLimiting\TokenBucketRateLimiterOptions.cs (7)
7
/// Options to control the behavior of a <see cref="
TokenBucketRateLimiter
"/>.
13
/// Must be set to a value greater than <see cref="TimeSpan.Zero" /> by the time these options are passed to the constructor of <see cref="
TokenBucketRateLimiter
"/>.
19
/// Must be set to a value > 0 by the time these options are passed to the constructor of <see cref="
TokenBucketRateLimiter
"/>.
24
/// Specified whether the <see cref="
TokenBucketRateLimiter
"/> is automatically replenishing tokens or if someone else
25
/// will be calling <see cref="
TokenBucketRateLimiter
.TryReplenish"/> to replenish tokens.
34
/// Must be set to a value > 0 by the time these options are passed to the constructor of <see cref="
TokenBucketRateLimiter
"/>.
48
/// Must be set to a value >= 0 by the time these options are passed to the constructor of <see cref="
TokenBucketRateLimiter
"/>.