3 writes to _index
Microsoft.AspNetCore.OutputCaching (3)
RecyclableArrayBufferWriter.cs (3)
29_index = 0; 35_index = 0; 55_index += count;
9 references to _index
Microsoft.AspNetCore.OutputCaching (9)
RecyclableArrayBufferWriter.cs (9)
24public int FreeCapacity => _buffer.Length - _index; 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(); 120oldArray.AsSpan(0, _index).CopyTo(_buffer);