13 writes to _position
System.Private.CoreLib (13)
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (13)
92_origin = _position = index; 224_position = _length; 229_position = newPos; 245_position += n; 316_position = _origin + (int)value; 341_position += n; 364_position += n; 434return _buffer[_position++]; 532_position = tempPosition; 566_position = newLength; 619_position = i; 660_position = i; 740_buffer[_position++] = value;
30 references to _position
System.Private.CoreLib (30)
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (30)
210return _position; 219int origPos = _position; 238int n = _length - _position; 244Debug.Assert(_position + n >= 0); // len is less than 2^31 -1. 307return _position - _origin; 325int n = _length - _position; 331Debug.Assert(_position + n >= 0); // len is less than 2^31 -1. 337buffer[offset + byteCount] = _buffer[_position + byteCount]; 340Buffer.BlockCopy(_buffer, _position, buffer, offset, n); 358int n = Math.Min(_length - _position, buffer.Length); 362new Span<byte>(_buffer, _position, n).CopyTo(buffer); 431if (_position >= _length) 453int originalPosition = _position; 489int pos = _position; 490int n = InternalEmulateRead(_length - _position); 519SeekOrigin.Current => _position, 534Debug.Assert(_position >= _origin); 535return _position - _origin; 565if (_position > newLength) 585int i = _position + count; 592bool mustZero = _position > _length; 612_buffer[_position + byteCount] = buffer[offset + byteCount]; 617Buffer.BlockCopy(buffer, offset, _buffer, _position, count); 637int i = _position + buffer.Length; 643bool mustZero = _position > _length; 659buffer.CopyTo(new Span<byte>(_buffer, _position, buffer.Length)); 722if (_position >= _length) 724int newLength = _position + 1; 725bool mustZero = _position > _length; 736Array.Clear(_buffer, _length, _position - _length);