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

System.Threading.RateLimiting.SlidingWindowRateLimiterOptions

public sealed class SlidingWindowRateLimiterOptions
Options to specify the behavior of a SlidingWindowRateLimiter.
public bool AutoReplenishment { get; set; }

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

public int PermitLimit { get; set; }

Maximum number of requests that can be served in a window. Must be set to a value > 0 by the time these options are passed to the constructor of SlidingWindowRateLimiter.

public int QueueLimit { get; set; }

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

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

public int SegmentsPerWindow { get; set; }

Specifies the maximum number of segments a window is divided into. Must be set to a value > 0 by the time these options are passed to the constructor of SlidingWindowRateLimiter.

public TimeSpan Window { 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 SlidingWindowRateLimiter.