示例#1
0
 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 );
 }
示例#2
0
        public void RemoveTopicBroker(string topic, string name)
        {
            BrokerCircleTopicList entry = FindTopic(topic);

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