示例#1
0
        public void RemoveTopicBroker(string topic, string name)
        {
            TopicBrokers entry = FindTopic(topic);

            if (entry != null)
            {
                entry.RemoveBroker(name);
                if (!entry.HasBrokers())
                {
                    topicBrokers.Remove(entry);
                }
            }
        }
示例#2
0
        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);
        }
示例#3
0
 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 );
 }