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); } }
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); } }