3 writes to SegmentsPerWindow
RateLimitingSample (1)
SampleRateLimiterPolicy.cs (1)
34SegmentsPerWindow = 1
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
114SegmentsPerWindow = options.SegmentsPerWindow,
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (1)
80SegmentsPerWindow = options.SegmentsPerWindow,
7 references to SegmentsPerWindow
System.Threading.RateLimiting (7)
System\Threading\RateLimiting\RateLimitPartition.cs (1)
114SegmentsPerWindow = options.SegmentsPerWindow,
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (6)
61if (options.SegmentsPerWindow <= 0) 63throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.SegmentsPerWindow)), nameof(options)); 80SegmentsPerWindow = options.SegmentsPerWindow, 85_replenishmentPeriod = new TimeSpan(_options.Window.Ticks / _options.SegmentsPerWindow); 88_requestsPerSegment = new int[options.SegmentsPerWindow]; 308_currentSegmentIndex = (_currentSegmentIndex + 1) % _options.SegmentsPerWindow;