2 writes to _currentSegmentIndex
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (2)
93
_currentSegmentIndex
= 0;
368
_currentSegmentIndex
= (_currentSegmentIndex + 1) % _options.SegmentsPerWindow;
7 references to _currentSegmentIndex
System.Threading.RateLimiting (7)
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (7)
262
int segmentIndex = (
_currentSegmentIndex
+ i) % _options.SegmentsPerWindow;
304
_requestsPerSegment[
_currentSegmentIndex
] += permitCount;
368
_currentSegmentIndex = (
_currentSegmentIndex
+ 1) % _options.SegmentsPerWindow;
369
int oldSegmentPermitCount = _requestsPerSegment[
_currentSegmentIndex
];
370
_requestsPerSegment[
_currentSegmentIndex
] = 0;
409
_requestsPerSegment[
_currentSegmentIndex
] += nextPendingRequest.Count;
416
_requestsPerSegment[
_currentSegmentIndex
] -= nextPendingRequest.Count;