示例#1
0
 public void RemoveAccount(IChatBotAccount Account)
 {
     if (this.AccountClientMap.ContainsKey(Account))
     {
         lock (this.AccountClientMap) {
             this.AccountClientMap[Account].Stop();
             this.AccountClientMap.Remove(Account);
         }
     }
 }
示例#2
0
 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();
         }
     }
 }
示例#3
0
 public void BeginNewBotInstance(String Protcol, IChatBotAccount Account, IChatBotConfig Config)
 {
 }