⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linereader.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Base.Sipc
{
    using System;
    using System.IO;
    using System.Text;

    public class LineReader
    {
        private static char[] _newLine = new char[] { '\r', '\n' };
        private MemoryStream _stream;

        public void Bind(MemoryStream stream)
        {
            this._stream = stream;
        }

        public string ReadLine()
        {
            long position = this._stream.Position;
            while (this._stream.Position < this._stream.Length)
            {
                if (((this._stream.ReadByte() == 13) && (this._stream.Position < this._stream.Length)) && (this._stream.ReadByte() == 10))
                {
                    break;
                }
            }
            long num2 = this._stream.Position;
            if (num2 <= position)
            {
                return null;
            }
            string text = Encoding.UTF8.GetString(this._stream.GetBuffer(), (int) position, (int) (num2 - position));
            if (text == null)
            {
                return null;
            }
            return text.TrimEnd(_newLine);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -