4 writes to _buffer
Microsoft.Extensions.Caching.Hybrid (4)
Internal\RecyclableArrayBufferWriter.cs (4)
60_buffer = []; 73_buffer = []; 141_buffer = []; 190_buffer = ArrayPool<T>.Shared.Rent(newSize);
14 references to _buffer
Microsoft.Extensions.Caching.Hybrid (14)
Internal\RecyclableArrayBufferWriter.cs (14)
47public int FreeCapacity => _buffer.Length - _index; 72var tmp = _buffer; 87if (_index > _buffer.Length - count) 114public ReadOnlyMemory<T> GetCommittedMemory() => new(_buffer, 0, _index); // could also directly expose a ReadOnlySpan<byte> if useful 119Debug.Assert(_buffer.Length > _index, "should have some space"); 120return _buffer.AsMemory(_index); 126Debug.Assert(_buffer.Length > _index, "should have some space"); 127return _buffer.AsSpan(_index); 131public T[] ToArray() => _buffer.AsSpan(0, _index).ToArray(); 138var tmp = _index == 0 ? [] : _buffer; 150return _index == 0 ? [] : _buffer; 162var currentLength = _buffer.Length; 189var oldArray = _buffer; 191oldArray.AsSpan(0, _index).CopyTo(_buffer);