2 writes to _buffer
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\BufferWriterPool\BufferWriter.cs (2)
76Array.Resize(ref _buffer, value); 185Array.Resize(ref _buffer, targetCapacity);
10 references to _buffer
Microsoft.Extensions.Diagnostics.ResourceMonitoring (10)
src\Shared\BufferWriterPool\BufferWriter.cs (10)
45public ReadOnlyMemory<T> WrittenMemory => _buffer.AsMemory(0, WrittenCount); 54public ReadOnlySpan<T> WrittenSpan => _buffer.AsSpan(0, WrittenCount); 70get => _buffer.Length; 103_buffer.AsSpan(0, WrittenCount).Clear(); 121_ = Throw.IfOutOfRange(count, 0, _buffer.Length - WrittenCount); 142return _buffer.AsMemory(WrittenCount); 161return _buffer.AsSpan(WrittenCount); 171var avail = _buffer.Length - WrittenCount; 174var targetCapacity = _buffer.Length == 0 ? DefaultCapacity : _buffer.Length * 2;