internal int InternalEmulateRead(int count) { if (!_isOpen) throw new InvalidOperationException(); var n = _length - _position; if (n > count) n = count; if (n < 0) n = 0; _position += n; return n; }