public void AddTopicBroker( string topic, BrokerCircle bro ) { BrokerCircleTopicList entry = FindTopic( topic ); if ( entry != null ) { entry.AddBroker( bro ); return; } entry = new BrokerCircleTopicList(); entry.topic = topic; entry.AddBroker( bro ); table.Add( entry ); }
public void RemoveTopicBroker(string topic, string name) { BrokerCircleTopicList entry = FindTopic(topic); if (entry != null) { entry.RemoveBroker(name); if (!entry.HasBrokers()) { table.Remove(entry); } } }
public void AddTopicBroker(string topic, BrokerCircle bro) { BrokerCircleTopicList entry = FindTopic(topic); if (entry != null) { entry.AddBroker(bro); return; } entry = new BrokerCircleTopicList(); entry.topic = topic; entry.AddBroker(bro); table.Add(entry); }