suspender.cs

来自「破解的飞信源代码」· CS 代码 · 共 27 行

CS
27
字号
namespace Imps.Client
{
    using System;
    using System.Runtime.InteropServices;

    [StructLayout(LayoutKind.Sequential)]
    public struct Suspender : IDisposable
    {
        private ISuspendable _host;
        public Suspender(ISuspendable host)
        {
            if (host == null)
            {
                throw new ArgumentNullException("host");
            }
            this._host = host;
            this._host.SuspendUpdate();
        }

        public void Dispose()
        {
            this._host.ResumeUpdate();
        }
    }
}

⌨️ 快捷键说明

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