4 writes to _rentedBuffer
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
src\Shared\PooledArrayBufferWriter.cs (4)
19_rentedBuffer = ArrayPool<T>.Shared.Rent(MinimumBufferSize); 27_rentedBuffer = ArrayPool<T>.Shared.Rent(initialCapacity); 96_rentedBuffer = null; 163_rentedBuffer = ArrayPool<T>.Shared.Rent(newSize);
21 references to _rentedBuffer
Microsoft.AspNetCore.Mvc.ViewFeatures (21)
src\Shared\PooledArrayBufferWriter.cs (21)
37return _rentedBuffer.AsMemory(0, _index); 57return _rentedBuffer.Length; 67return _rentedBuffer.Length - _index; 80Debug.Assert(_rentedBuffer != null); 82_rentedBuffer.AsSpan(0, _index).Clear(); 89if (_rentedBuffer == null) 95ArrayPool<T>.Shared.Return(_rentedBuffer); 101if (_rentedBuffer == null) 118if (_index > _rentedBuffer.Length - count) 120ThrowInvalidOperationException(_rentedBuffer.Length); 131return _rentedBuffer.AsMemory(_index); 139return _rentedBuffer.AsSpan(_index); 144Debug.Assert(_rentedBuffer != null); 153var availableSpace = _rentedBuffer.Length - _index; 157var growBy = Math.Max(sizeHint, _rentedBuffer.Length); 159var newSize = checked(_rentedBuffer.Length + growBy); 161var oldBuffer = _rentedBuffer; 166Debug.Assert(_rentedBuffer.Length >= _index); 169previousBuffer.CopyTo(_rentedBuffer); 174Debug.Assert(_rentedBuffer.Length - _index > 0); 175Debug.Assert(_rentedBuffer.Length - _index >= sizeHint);