5 writes to _count
System.Text.Json (5)
System\Text\Json\Serialization\StreamReadBufferState.cs (5)
47_maxCount = _count = _offset = 0; 80bufferState._count += bytesRead; 110_count += bytesRead; 127_count -= bytesConsumedInt; 174_count -= JsonConstants.Utf8Bom.Length;
14 references to _count
System.Text.Json (14)
System\Text\Json\Serialization\StreamReadBufferState.cs (14)
54public readonly ReadOnlySequence<byte> Bytes => new(_buffer.AsMemory(_offset, _count)); 72int bytesRead = await stream.ReadAsync(bufferState._buffer.AsMemory(bufferState._count), cancellationToken).ConfigureAwait(false); 82while (bufferState._count < minBufferCount); 99_buffer.AsSpan(_count)); 112while (_count < _buffer.Length); 122Debug.Assert(bytesConsumed <= _count); 132if ((uint)_count > ((uint)_buffer.Length / 2)) 140Buffer.BlockCopy(oldBuffer, _offset + bytesConsumedInt, newBuffer, 0, _count); 142_maxCount = _count; 148else if (_count != 0) 151Buffer.BlockCopy(_buffer, _offset + bytesConsumedInt, _buffer, 0, _count); 160if (_count > _maxCount) 162_maxCount = _count; 171if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.Utf8Bom))