3 writes to _buffer
Microsoft.AspNetCore.OutputCaching (3)
RecyclableArrayBufferWriter.cs (3)
28_buffer = Array.Empty<T>(); 36_buffer = Array.Empty<T>(); 119_buffer = ArrayPool<T>.Shared.Rent(newSize);
12 references to _buffer
Microsoft.AspNetCore.OutputCaching (12)
RecyclableArrayBufferWriter.cs (12)
24public int FreeCapacity => _buffer.Length - _index; 34var tmp = _buffer; 50if (_index > _buffer.Length - count) 61public ReadOnlyMemory<T> GetCommittedMemory() => new ReadOnlyMemory<T>(_buffer, 0, _index); // could also directly expose a ReadOnlySpan<byte> if useful 66Debug.Assert(_buffer.Length > _index); 67return _buffer.AsMemory(_index); 73Debug.Assert(_buffer.Length > _index); 74return _buffer.AsSpan(_index); 78public T[] ToArray() => _buffer.AsSpan(0, _index).ToArray(); 91int currentLength = _buffer.Length; 118var oldArray = _buffer; 120oldArray.AsSpan(0, _index).CopyTo(_buffer);