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