using System; using AppleBatch_June.AppleWebServace; using AppleBatch_June.ExecuteTasks; using AppleBatch_June.Model; using AppleBatch_June.Utils; namespace AppleBatch_June.Interfaces { public class WebAccountDisabled : IAccountDisabled { private Action action; private Action applyAtion; private bool _openVpn; public ITaskRunState taskState; public WebAccountDisabled(bool openVpn, Action _action, Action _applyAtion, ITaskRunState _taskState) { taskState = _taskState ?? throw new Exception("任务运行状态不能是空的"); _openVpn = openVpn; action = _action; applyAtion = _applyAtion; } public bool accountCheck(string account, string pwd, string notityKey) { if (AppSysConfig.webProtocolS2k) { return new AppleReportaproblemWeb(_openVpn, action, applyAtion, taskState) { ProxyIp = ProxyAccountCache.getProxyAccountIP(account) }.checkDisable(account, pwd, notityKey); } AppleManageWebUtlis appleManageWebUtlis = new AppleManageWebUtlis(action, applyAtion, taskState); appleManageWebUtlis.ProxyIp = ProxyAccountCache.getProxyAccountIP(account); bool result = appleManageWebUtlis.checkDisable(_openVpn, account, pwd, notityKey); appleManageWebUtlis.reportSingOut(); return result; } } }