5 writes to _rentedBuffer
Microsoft.Extensions.Logging.Console (5)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (5)
42_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 99_rentedBuffer = null; 122_rentedBuffer = null; 131_rentedBuffer = ArrayPool<byte>.Shared.Rent(initialCapacity); 202_rentedBuffer = ArrayPool<byte>.Shared.Rent(newSize);
27 references to _rentedBuffer
Microsoft.Extensions.Logging.Console (27)
src\libraries\Common\src\System\Text\Json\PooledByteBufferWriter.cs (27)
55Debug.Assert(_rentedBuffer != null); 56Debug.Assert(_index <= _rentedBuffer.Length); 57return _rentedBuffer.AsMemory(0, _index); 65Debug.Assert(_rentedBuffer != null); 74Debug.Assert(_rentedBuffer != null); 75return _rentedBuffer.Length; 83Debug.Assert(_rentedBuffer != null); 84return _rentedBuffer.Length - _index; 95Debug.Assert(_rentedBuffer != null); 98byte[] toReturn = _rentedBuffer; 105Debug.Assert(_rentedBuffer != null); 106Debug.Assert(_index <= _rentedBuffer.Length); 108_rentedBuffer.AsSpan(0, _index).Clear(); 115if (_rentedBuffer == null) 121byte[] toReturn = _rentedBuffer; 129Debug.Assert(_rentedBuffer is null); 139Debug.Assert(_rentedBuffer != null); 141Debug.Assert(_index <= _rentedBuffer.Length - count); 148return _rentedBuffer.AsMemory(_index); 154return _rentedBuffer.AsSpan(_index); 172Debug.Assert(_rentedBuffer != null); 175int currentLength = _rentedBuffer.Length; 200byte[] oldBuffer = _rentedBuffer; 205Debug.Assert(_rentedBuffer.Length >= _index); 208oldBufferAsSpan.CopyTo(_rentedBuffer); 213Debug.Assert(_rentedBuffer.Length - _index > 0); 214Debug.Assert(_rentedBuffer.Length - _index >= sizeHint);