17 writes to _byteLen
System.Private.CoreLib (17)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (17)
314
_byteLen
= 0;
495
_byteLen
-= n;
617
_byteLen
= 0;
636
_byteLen
+= len;
641
_byteLen
= _stream.Read(_byteBuffer, 0, _byteBuffer.Length);
684
_byteLen
= 0;
705
_byteLen
= 0;
740
_byteLen
+= len;
745
_byteLen
= _stream.Read(_byteBuffer, 0, _byteBuffer.Length);
808
_byteLen
= 0;
1163
_byteLen
= 0;
1207
_byteLen
+= len;
1214
_byteLen
= await tmpStream.ReadAsync(new Memory<byte>(tmpByteBuffer), cancellationToken).ConfigureAwait(false);
1383
_byteLen
= 0;
1403
_byteLen
+= len;
1408
_byteLen
= await tmpStream.ReadAsync(new Memory<byte>(tmpByteBuffer), cancellationToken).ConfigureAwait(false);
1451
_byteLen
= 0;
37 references to _byteLen
System.Private.CoreLib (37)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (37)
491
Debug.Assert(
_byteLen
>= n, "CompressBuffer was called with a number of bytes greater than the current buffer length. Are two threads using this StreamReader at the same time?");
494
new ReadOnlySpan<byte>(byteBuffer, n,
_byteLen
- n).CopyTo(byteBuffer);
500
Debug.Assert(
_byteLen
>= 2, "Caller should've validated that at least 2 bytes were available.");
517
if (
_byteLen
< 4 || byteBuffer[2] != 0 || byteBuffer[3] != 0)
530
else if (
_byteLen
>= 3 && firstTwoBytes == 0xBBEF && byteBuffer[2] == 0xBF)
537
else if (
_byteLen
>= 4 && firstTwoBytes == 0 && byteBuffer[2] == 0xFE && byteBuffer[3] == 0xFF)
544
else if (
_byteLen
== 2)
582
int len = Math.Min(
_byteLen
, preamble.Length);
642
Debug.Assert(
_byteLen
>= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
644
if (
_byteLen
== 0)
654
_isBlocked = (
_byteLen
< _byteBuffer.Length);
666
if (_detectEncoding &&
_byteLen
>= 2)
672
_charLen = _decoder.GetChars(_byteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: false);
682
_charLen = _decoder.GetChars(_byteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: true);
746
Debug.Assert(
_byteLen
>= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
748
if (
_byteLen
== 0)
758
_isBlocked = (
_byteLen
< _byteBuffer.Length);
771
if (_detectEncoding &&
_byteLen
>= 2)
781
charsRead = _decoder.GetChars(new ReadOnlySpan<byte>(_byteBuffer, 0,
_byteLen
), userBuffer, flush: false);
785
charsRead = _decoder.GetChars(_byteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: false);
800
charsRead = _decoder.GetChars(new ReadOnlySpan<byte>(_byteBuffer, 0,
_byteLen
), userBuffer, flush: true);
804
charsRead = _decoder.GetChars(_byteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: true);
1185
if (
_byteLen
> 0)
1189
n = _decoder.GetChars(new ReadOnlySpan<byte>(tmpByteBuffer, 0,
_byteLen
), buffer.Span.Slice(charsRead), flush: false);
1194
n = _decoder.GetChars(tmpByteBuffer, 0,
_byteLen
, _charBuffer, 0);
1216
Debug.Assert(
_byteLen
>= 0, "Stream.Read returned a negative number! This is a bug in your stream class.");
1218
if (
_byteLen
== 0) // EOF
1228
_isBlocked = (
_byteLen
< tmpByteBuffer.Length);
1241
if (_detectEncoding &&
_byteLen
>= 2)
1253
n = _decoder.GetChars(new ReadOnlySpan<byte>(tmpByteBuffer, 0,
_byteLen
), buffer.Span.Slice(charsRead), flush: false);
1258
n = _decoder.GetChars(tmpByteBuffer, 0,
_byteLen
, _charBuffer, 0);
1409
Debug.Assert(
_byteLen
>= 0, "Stream.Read returned a negative number! Bug in stream class.");
1411
if (
_byteLen
== 0)
1421
_isBlocked = (
_byteLen
< tmpByteBuffer.Length);
1433
if (_detectEncoding &&
_byteLen
>= 2)
1439
_charLen = _decoder.GetChars(tmpByteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: false);
1449
_charLen = _decoder.GetChars(_byteBuffer, 0,
_byteLen
, _charBuffer, 0, flush: true);