5 writes to _count
System.Text.Json (5)
System\Text\Json\Serialization\StreamReadBufferState.cs (5)
47_maxCount = _count = _offset = 0; 82bufferState._count += bytesRead; 112_count += bytesRead; 129_count -= bytesConsumedInt; 184_count -= JsonConstants.Utf8Bom.Length;
15 references to _count
System.Text.Json (15)
System\Text\Json\Serialization\StreamReadBufferState.cs (15)
55public readonly ReadOnlySequence<byte> Bytes => new(_buffer.AsMemory(_offset, _count)); 74int bytesRead = await stream.ReadAsync(bufferState._buffer.AsMemory(bufferState._count), cancellationToken).ConfigureAwait(false); 84while (bufferState._count < minBufferCount); 101_buffer.AsSpan(_count)); 114while (_count < _buffer.Length); 124Debug.Assert(bytesConsumed <= _count); 134if ((uint)_count > ((uint)_buffer.Length / 2)) 142Buffer.BlockCopy(oldBuffer, _offset + bytesConsumedInt, newBuffer, 0, _count); 144_maxCount = _count; 150else if (_count != 0) 153Buffer.BlockCopy(_buffer, _offset + bytesConsumedInt, _buffer, 0, _count); 163_buffer.AsSpan(_offset, _count), 170if (_count > _maxCount) 172_maxCount = _count; 181if (_buffer.AsSpan(0, _count).StartsWith(JsonConstants.Utf8Bom))