Пример #1
0
 private void registerAgent(MetaAgent agent)
 {
     try
     {
         if (this.socket)
         {
             this.socketAgent.MessageSender(Util.updateRouterMessage(agent.Name, base.Name));
         }
         else
         {
             this.FindSuperPortal().routingTable.Add(agent.Name, agent);
         }
     }
     catch (Exception e)
     {
         Util.Log(e.Message);
     }
 }
Пример #2
0
 public void addAgent(MetaAgent agent)
 {
     agent.AgentPortal = this;
     try
     {
         this.routingTable.Add(agent.Name, agent);
         if (agent.GetType() == typeof(MetaAgent))
         {
             if (this.connected)
             {
                 this.registerAgent(agent);
             }
             else
             {
                 this.unregisteredAgent.Add(agent);
             }
         }
     }
     catch (Exception e)
     {
         Util.Log(e.Message);
     }
 }