using System.Diagnostics; using Netch.Models; namespace Netch.Controllers { public abstract class ServerClient : Controller { /// /// 启动 /// /// 服务器 /// 模式 /// 是否启动成功 public abstract bool Start(Server server, Mode mode); /// /// ServerClient 停止 /// /// 注意 对象类型 以调用子类 Stop() 方法 /// public new void Stop() { base.Stop(); // SSController Stop() // 不能自动转换对象类型的兼容代码 :( if (Global.Settings.BootShadowsocksFromDLL) NativeMethods.Shadowsocks.Stop(); } public abstract void OnOutputDataReceived(object sender, DataReceivedEventArgs e); } }