<PackageReference Include="System.Threading.RateLimiting" Version="11.0.0-preview.2.26159.112" />

System.Threading.RateLimiting.TokenBucketRateLimiterOptions

public sealed class TokenBucketRateLimiterOptions
Options to control the behavior of a TokenBucketRateLimiter.
public bool AutoReplenishment { get; set; }

Specified whether the TokenBucketRateLimiter is automatically replenishing tokens or if someone else will be calling TryReplenish to replenish tokens.

public int QueueLimit { get; set; }

Maximum cumulative token count of queued acquisition requests. Must be set to a value >= 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.

Determines the behaviour of AcquireAsync when not enough resources can be leased.

public TimeSpan ReplenishmentPeriod { get; set; }

Specifies the minimum period between replenishments. Must be set to a value greater than Zero by the time these options are passed to the constructor of TokenBucketRateLimiter.

public int TokenLimit { get; set; }

Maximum number of tokens that can be in the bucket at any time. Must be set to a value > 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.

public int TokensPerPeriod { get; set; }

Specifies the maximum number of tokens to restore each replenishment. Must be set to a value > 0 by the time these options are passed to the constructor of TokenBucketRateLimiter.