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)
81
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)
62
if (options.
SegmentsPerWindow
<= 0)
64
throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.
SegmentsPerWindow
)), nameof(options));
81
SegmentsPerWindow = options.
SegmentsPerWindow
,
86
_replenishmentPeriod = new TimeSpan(_options.Window.Ticks / _options.
SegmentsPerWindow
);
89
_requestsPerSegment = new int[options.
SegmentsPerWindow
];
309
_currentSegmentIndex = (_currentSegmentIndex + 1) % _options.
SegmentsPerWindow
;