2 writes to _currentSegment
System.Linq (2)
System\Linq\SegmentedArrayBuilder.cs (2)
47_currentSegment = _firstSegment = scratchBuffer; 355_currentSegment = _segments[_segmentsCount] = ArrayPool<T>.Shared.Rent(newSegmentLength);
11 references to _currentSegment
System.Linq (11)
System\Linq\SegmentedArrayBuilder.cs (11)
105Span<T> currentSegment = _currentSegment; 122_currentSegment[0] = item; 144int availableSpaceInCurrentSpan = _currentSegment.Length - _countInCurrentSegment; 146sourceSlice.CopyTo(_currentSegment.Slice(_countInCurrentSegment)); 153sourceSlice.CopyTo(_currentSegment); 162bool currentSegmentIsScratchBufferWithRemainingSpace = _segmentsCount == 0 && _countInCurrentSegment < _currentSegment.Length; 169int remainingSpaceInCurrentSegment = _currentSegment.Length - _countInCurrentSegment; 214Span<T> currentSegment = _currentSegment; 227currentSegment = _currentSegment; 328_currentSegment.Slice(0, _countInCurrentSegment).CopyTo(destination); 342int currentSegmentLength = _currentSegment.Length;