Files
kami_itunes_june/AppleBatch_June.Interfaces/WebAccountDisabled.cs
2024-07-22 00:43:14 +08:00

44 lines
1.4 KiB
C#

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<string, DisplyType, string> action;
private Action<string, DisplyType, string> applyAtion;
private bool _openVpn;
public ITaskRunState taskState;
public WebAccountDisabled(bool openVpn, Action<string, DisplyType, string> _action, Action<string, DisplyType, string> _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;
}
}
}