Beispiel #1
0
 private void AddEventPublisher(EventPublisherInfo publisher)
 {
     if (events.ContainsKey(publisher.Topic))
     {
         throw new ArgumentException("接口 [" + events[publisher.Topic].EventInfo.DeclaringType.ToString() + "] 和接口 [" + publisher.EventInfo.DeclaringType.ToString() + "] 重复定义了topic为 [" + publisher.Topic + "] 的事件");
     }
     events.Add(publisher.Topic, publisher);
 }
 private void AddEventPublisher(EventPublisherInfo publisher)
 {
     if (events.ContainsKey(publisher.Topic)) 
         throw new ArgumentException("接口 [" + events[publisher.Topic].EventInfo.DeclaringType.ToString() + "] 和接口 [" + publisher.EventInfo.DeclaringType.ToString() + "] 重复定义了topic为 [" + publisher.Topic + "] 的事件");
     events.Add(publisher.Topic, publisher);
 }