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