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)
24
public int FreeCapacity => _buffer.Length -
_index
;
50
if (
_index
> _buffer.Length - count)
61
public ReadOnlyMemory<T> GetCommittedMemory() => new ReadOnlyMemory<T>(_buffer, 0,
_index
); // could also directly expose a ReadOnlySpan<byte> if useful
66
Debug.Assert(_buffer.Length >
_index
);
67
return _buffer.AsMemory(
_index
);
73
Debug.Assert(_buffer.Length >
_index
);
74
return _buffer.AsSpan(
_index
);
78
public T[] ToArray() => _buffer.AsSpan(0,
_index
).ToArray();
120
oldArray.AsSpan(0,
_index
).CopyTo(_buffer);