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