7 writes to bytes
System.Private.Xml (7)
System\Xml\Core\XmlTextReaderImpl.cs (3)
2855_ps.bytes = bytes; 2872_ps.bytes = new byte[bufferSize]; 3402_ps.bytes = newBytes;
System\Xml\Core\XmlTextReaderImplAsync.cs (3)
880_ps.bytes = bytes; 899_ps.bytes = new byte[bufferSize]; 1072_ps.bytes = newBytes;
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
74bytes = null;
42 references to bytes
System.Private.Xml (42)
System\Xml\Core\XmlTextReaderImpl.cs (29)
2857bufferSize = _ps.bytes.Length; 2870if (_ps.bytes == null || _ps.bytes.Length < bufferSize) 2884if (_ps.bytesUsed < 4 && _ps.bytes.Length - _ps.bytesUsed > 0) 2886int bytesToRead = Math.Min(4, _ps.bytes.Length - _ps.bytesUsed); 2887int read = stream.ReadAtLeast(_ps.bytes.AsSpan(_ps.bytesUsed), bytesToRead, throwOnEndOfStream: false); 3090Debug.Assert(_ps.bytes != null); 3098int first2Bytes = _ps.bytes[0] << 8 | _ps.bytes[1]; 3099int next2Bytes = (_ps.bytesUsed >= 4) ? (_ps.bytes[2] << 8 | _ps.bytes[3]) : 0; 3196Debug.Assert(_ps.bytes != null); 3198if (_ps.bytes.AsSpan(0, _ps.bytesUsed).StartsWith(preamble)) 3286Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null); 3397Debug.Assert(_ps.bytes != null); 3398if (_ps.bytes.Length - _ps.bytesUsed < MaxByteSequenceLen) 3400byte[] newBytes = new byte[_ps.bytes.Length * 2]; 3401BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.bytesUsed); 3471Debug.Assert(_ps.bytes != null); 3472BlockCopy(_ps.bytes, _ps.bytePos, _ps.bytes, 0, bytesLeft); 3486Debug.Assert(_ps.bytes != null); 3489if (_ps.bytePos == _ps.bytesUsed && _ps.bytes.Length - _ps.bytesUsed > 0) 3491int read = _ps.stream.Read(_ps.bytes, _ps.bytesUsed, _ps.bytes.Length - _ps.bytesUsed); 3536Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null); 3552_ps.decoder.Convert(_ps.bytes, _ps.bytePos, bytesCount, _ps.chars, _ps.charsUsed, maxCharsCount, false, out bytesCount, out charsCount, out completed); 3578Debug.Assert(_ps.bytes != null); 3580_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)
882bufferSize = _ps.bytes.Length; 897if (_ps.bytes == null || _ps.bytes.Length < bufferSize) 911if (_ps.bytesUsed < 4 && _ps.bytes.Length - _ps.bytesUsed > 0) 913int bytesToRead = Math.Min(4, _ps.bytes.Length - _ps.bytesUsed); 914int read = await stream.ReadAtLeastAsync(_ps.bytes.AsMemory(_ps.bytesUsed), bytesToRead, throwOnEndOfStream: false).ConfigureAwait(false); 1068if (_ps.bytes!.Length - _ps.bytesUsed < MaxByteSequenceLen) 1070byte[] newBytes = new byte[_ps.bytes.Length * 2]; 1071BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.bytesUsed); 1141BlockCopy(_ps.bytes!, _ps.bytePos, _ps.bytes!, 0, bytesLeft); 1155if (_ps.bytePos == _ps.bytesUsed && _ps.bytes!.Length - _ps.bytesUsed > 0) 1157int read = await _ps.stream.ReadAsync(_ps.bytes.AsMemory(_ps.bytesUsed)).ConfigureAwait(false);