11 writes to bytesUsed
System.Private.Xml (11)
System\Xml\Core\XmlTextReaderImpl.cs (5)
2855
_ps.
bytesUsed
= byteCount;
2891
_ps.
bytesUsed
+= read;
3419
_ps.
bytesUsed
= 0;
3425
_ps.
bytesUsed
= bytesLeft;
3448
_ps.
bytesUsed
+= read;
System\Xml\Core\XmlTextReaderImplAsync.cs (5)
881
_ps.
bytesUsed
= byteCount;
919
_ps.
bytesUsed
+= read;
1107
_ps.
bytesUsed
= 0;
1112
_ps.
bytesUsed
= bytesLeft;
1132
_ps.
bytesUsed
+= read;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
75
bytesUsed
= 0;
27 references to bytesUsed
System.Private.Xml (27)
System\Xml\Core\XmlTextReaderImpl.cs (16)
2883
if (_ps.
bytesUsed
< 4 && _ps.bytes.Length - _ps.
bytesUsed
> 0)
2885
int bytesToRead = Math.Min(4, _ps.bytes.Length - _ps.
bytesUsed
);
2886
int read = stream.ReadAtLeast(_ps.bytes.AsSpan(_ps.
bytesUsed
), bytesToRead, throwOnEndOfStream: false);
3092
if (_ps.
bytesUsed
< 2)
3098
int next2Bytes = (_ps.
bytesUsed
>= 4) ? (_ps.bytes[2] << 8 | _ps.bytes[3]) : 0;
3197
if (_ps.bytes.AsSpan(0, _ps.
bytesUsed
).StartsWith(preamble))
3362
if (_ps.
bytesUsed
- _ps.bytePos < MaxByteSequenceLen)
3365
if (_ps.bytes.Length - _ps.
bytesUsed
< MaxByteSequenceLen)
3368
BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.
bytesUsed
);
3414
int bytesLeft = _ps.
bytesUsed
- _ps.bytePos;
3441
if (_ps.bytePos == _ps.
bytesUsed
&& _ps.bytes.Length - _ps.
bytesUsed
> 0)
3443
int read = _ps.stream.Read(_ps.bytes, _ps.
bytesUsed
, _ps.bytes.Length - _ps.
bytesUsed
);
3493
int bytesCount = _ps.
bytesUsed
- _ps.bytePos;
System\Xml\Core\XmlTextReaderImplAsync.cs (11)
911
if (_ps.
bytesUsed
< 4 && _ps.bytes.Length - _ps.
bytesUsed
> 0)
913
int bytesToRead = Math.Min(4, _ps.bytes.Length - _ps.
bytesUsed
);
914
int read = await stream.ReadAtLeastAsync(_ps.bytes.AsMemory(_ps.
bytesUsed
), bytesToRead, throwOnEndOfStream: false).ConfigureAwait(false);
1051
if (_ps.
bytesUsed
- _ps.bytePos < MaxByteSequenceLen)
1053
if (_ps.bytes!.Length - _ps.
bytesUsed
< MaxByteSequenceLen)
1056
BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.
bytesUsed
);
1102
int bytesLeft = _ps.
bytesUsed
- _ps.bytePos;
1125
if (_ps.bytePos == _ps.
bytesUsed
&& _ps.bytes!.Length - _ps.
bytesUsed
> 0)
1127
int read = await _ps.stream.ReadAsync(_ps.bytes.AsMemory(_ps.
bytesUsed
)).ConfigureAwait(false);