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)
73bytes = null;
42 references to bytes
System.Private.Xml (42)
System\Xml\Core\XmlTextReaderImpl.cs (29)
2856bufferSize = _ps.bytes.Length; 2869if (_ps.bytes == null || _ps.bytes.Length < bufferSize) 2883if (_ps.bytesUsed < 4 && _ps.bytes.Length - _ps.bytesUsed > 0) 2885int bytesToRead = Math.Min(4, _ps.bytes.Length - _ps.bytesUsed); 2886int read = stream.ReadAtLeast(_ps.bytes.AsSpan(_ps.bytesUsed), bytesToRead, throwOnEndOfStream: false); 3089Debug.Assert(_ps.bytes != null); 3097int first2Bytes = _ps.bytes[0] << 8 | _ps.bytes[1]; 3098int next2Bytes = (_ps.bytesUsed >= 4) ? (_ps.bytes[2] << 8 | _ps.bytes[3]) : 0; 3195Debug.Assert(_ps.bytes != null); 3197if (_ps.bytes.AsSpan(0, _ps.bytesUsed).StartsWith(preamble)) 3285Debug.Assert(_ps.stream != null && _ps.decoder != null && _ps.bytes != null); 3364Debug.Assert(_ps.bytes != null); 3365if (_ps.bytes.Length - _ps.bytesUsed < MaxByteSequenceLen) 3367byte[] newBytes = new byte[_ps.bytes.Length * 2]; 3368BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.bytesUsed); 3423Debug.Assert(_ps.bytes != null); 3424BlockCopy(_ps.bytes, _ps.bytePos, _ps.bytes, 0, bytesLeft); 3438Debug.Assert(_ps.bytes != null); 3441if (_ps.bytePos == _ps.bytesUsed && _ps.bytes.Length - _ps.bytesUsed > 0) 3443int read = _ps.stream.Read(_ps.bytes, _ps.bytesUsed, _ps.bytes.Length - _ps.bytesUsed); 3488Debug.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); 3530Debug.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)
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); 1053if (_ps.bytes!.Length - _ps.bytesUsed < MaxByteSequenceLen) 1055byte[] newBytes = new byte[_ps.bytes.Length * 2]; 1056BlockCopy(_ps.bytes, 0, newBytes, 0, _ps.bytesUsed); 1111BlockCopy(_ps.bytes!, _ps.bytePos, _ps.bytes!, 0, bytesLeft); 1125if (_ps.bytePos == _ps.bytesUsed && _ps.bytes!.Length - _ps.bytesUsed > 0) 1127int read = await _ps.stream.ReadAsync(_ps.bytes.AsMemory(_ps.bytesUsed)).ConfigureAwait(false);