3 writes to ReplenishmentPeriod
RateLimitingSample (1)
Program.cs (1)
31
options.
ReplenishmentPeriod
= TimeSpan.FromSeconds(10);
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
79
ReplenishmentPeriod
= options.ReplenishmentPeriod,
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (1)
77
ReplenishmentPeriod
= options.ReplenishmentPeriod,
9 references to ReplenishmentPeriod
System.Threading.RateLimiting (9)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
79
ReplenishmentPeriod = options.
ReplenishmentPeriod
,
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (8)
43
public override TimeSpan ReplenishmentPeriod => _options.
ReplenishmentPeriod
;
67
if (options.
ReplenishmentPeriod
<= TimeSpan.Zero)
69
throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.
ReplenishmentPeriod
)), nameof(options));
77
ReplenishmentPeriod = options.
ReplenishmentPeriod
,
83
_fillRate = (double)options.TokensPerPeriod / options.
ReplenishmentPeriod
.Ticks;
89
_renewTimer = new Timer(Replenish, this, _options.
ReplenishmentPeriod
, _options.
ReplenishmentPeriod
);
225
return new TokenBucketLease(false, TimeSpan.FromTicks(_options.
ReplenishmentPeriod
.Ticks * replenishPeriods));