public void RemoveAccount(IChatBotAccount Account) { if (this.AccountClientMap.ContainsKey(Account)) { lock (this.AccountClientMap) { this.AccountClientMap[Account].Stop(); this.AccountClientMap.Remove(Account); } } }
public void BindAccountWithClient(IChatBotAccount Account, IAsyncNetworkClient Client) { if (!this.AccountClientMap.ContainsKey(Account)) { lock (this.AccountClientMap) { this.AccountClientMap.Add(Account, Client); this.AccountClientMap[Account].ReceiveCallBack = this.Dispatcher; this.AccountClientMap[Account].Begin(); } } else { lock (this.AccountClientMap) { this.AccountClientMap[Account].Stop(); this.AccountClientMap[Account] = Client; this.AccountClientMap[Account].ReceiveCallBack = this.Dispatcher; this.AccountClientMap[Account].Begin(); } } }
public void BeginNewBotInstance(String Protcol, IChatBotAccount Account, IChatBotConfig Config) { }