5 writes to _count
System.Text.Json (5)
System\Text\Json\Serialization\ReadBufferState.cs (5)
47_maxCount = _count = _offset = 0; 81bufferState._count += bytesRead; 111_count += bytesRead; 126_count -= bytesConsumed; 173_count -= JsonConstants.Utf8Bom.Length;
14 references to _count
System.Text.Json (14)
System\Text\Json\Serialization\ReadBufferState.cs (14)
54public readonly ReadOnlySpan<byte> Bytes => _buffer.AsSpan(_offset, _count); 73int bytesRead = await utf8Json.ReadAsync(bufferState._buffer.AsMemory(bufferState._count), cancellationToken).ConfigureAwait(false); 83while (bufferState._count < minBufferCount); 100_buffer.AsSpan(_count)); 113while (_count < _buffer.Length); 123Debug.Assert(bytesConsumed <= _count); 131if ((uint)_count > ((uint)_buffer.Length / 2)) 139Buffer.BlockCopy(oldBuffer, _offset + bytesConsumed, newBuffer, 0, _count); 141_maxCount = _count; 147else if (_count != 0) 150Buffer.BlockCopy(_buffer, _offset + bytesConsumed, _buffer, 0, _count); 159if (_count > _maxCount) 161_maxCount = _count; 170if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.Utf8Bom))