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