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