3 writes to _index
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (3)
src\Shared\Buffers\RefPooledArrayBufferWriter.cs (3)
30_index = 0; 40_index = -1; 110_index += count;
16 references to _index
Microsoft.AspNetCore.DataProtection.MicroBenchmarks (16)
src\Shared\Buffers\RefPooledArrayBufferWriter.cs (16)
56Debug.Assert(_index >= 0); 57return _buffer.Slice(0, _index); 84Debug.Assert(_index >= 0); 87return _buffer.Slice(_index); 99Debug.Assert(_index >= 0); 105if (_index + count > _buffer.Length) 107throw new InvalidOperationException($"Cannot advance past the end of the buffer. Current position: {_index}, Capacity: {_buffer.Length}, Requested advance: {count}."); 127var bufferSpace = _buffer.Length - _index; 137Debug.Assert(_rentedBuffer.Length - _index > 0); 138Debug.Assert(_rentedBuffer.Length - _index >= sizeHint); 144var availableSpace = _buffer.Length - _index; 157Debug.Assert(oldBuffer.Length >= _index); 158Debug.Assert(_rentedBuffer.Length >= _index); 160var previousBuffer = oldBuffer.AsSpan(0, _index); 166Debug.Assert(_rentedBuffer.Length - _index > 0); 167Debug.Assert(_rentedBuffer.Length - _index >= sizeHint);