7 writes to bytes
System.Private.Xml (7)
System\Xml\Core\XmlTextReaderImpl.cs (3)
2854
_ps.
bytes
= bytes;
2871
_ps.
bytes
= new byte[bufferSize];
3369
_ps.
bytes
= newBytes;
System\Xml\Core\XmlTextReaderImplAsync.cs (3)
880
_ps.
bytes
= bytes;
899
_ps.
bytes
= new byte[bufferSize];
1057
_ps.
bytes
= newBytes;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
73
bytes
= null;
42 references to bytes
System.Private.Xml (42)
System\Xml\Core\XmlTextReaderImpl.cs (29)
2856
bufferSize = _ps.
bytes
.Length;
2869
if (_ps.
bytes
== null || _ps.
bytes
.Length < bufferSize)
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);
3089
Debug.Assert(_ps.
bytes
!= null);
3097
int first2Bytes = _ps.
bytes
[0] << 8 | _ps.
bytes
[1];
3098
int next2Bytes = (_ps.bytesUsed >= 4) ? (_ps.
bytes
[2] << 8 | _ps.
bytes
[3]) : 0;
3195
Debug.Assert(_ps.
bytes
!= null);
3197
if (_ps.
bytes
.AsSpan(0, _ps.bytesUsed).StartsWith(preamble))
3285
Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.
bytes
!= null);
3364
Debug.Assert(_ps.
bytes
!= null);
3365
if (_ps.
bytes
.Length - _ps.bytesUsed < MaxByteSequenceLen)
3367
byte[] newBytes = new byte[_ps.
bytes
.Length * 2];
3368
BlockCopy(_ps.
bytes
, 0, newBytes, 0, _ps.bytesUsed);
3423
Debug.Assert(_ps.
bytes
!= null);
3424
BlockCopy(_ps.
bytes
, _ps.bytePos, _ps.
bytes
, 0, bytesLeft);
3438
Debug.Assert(_ps.
bytes
!= null);
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);
3488
Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.
bytes
!= null);
3504
_ps.decoder.Convert(_ps.
bytes
, _ps.bytePos, bytesCount, _ps.chars, _ps.charsUsed, maxCharsCount, false, out bytesCount, out charsCount, out completed);
3530
Debug.Assert(_ps.
bytes
!= null);
3532
_ps.decoder.Convert(_ps.
bytes
, _ps.bytePos + bytesDecoded, 1, _ps.chars, _ps.charsUsed + charsDecoded, 2, false, out bDec, out chDec, out completed);
System\Xml\Core\XmlTextReaderImplAsync.cs (13)
882
bufferSize = _ps.
bytes
.Length;
897
if (_ps.
bytes
== null || _ps.
bytes
.Length < bufferSize)
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);
1053
if (_ps.
bytes
!.Length - _ps.bytesUsed < MaxByteSequenceLen)
1055
byte[] newBytes = new byte[_ps.
bytes
.Length * 2];
1056
BlockCopy(_ps.
bytes
, 0, newBytes, 0, _ps.bytesUsed);
1111
BlockCopy(_ps.
bytes
!, _ps.bytePos, _ps.
bytes
!, 0, bytesLeft);
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);