コード例 #1
0
 /// <summary>
 /// Subscribes the specified topic.
 /// </summary>
 /// <param name="topicAsString">The topic.</param>
 /// <param name="callback">The event.</param>
 /// <exception cref="InvalidTopicException">Topic is invalid.</exception>
 public void Subscribe(string topicAsString, Action <string, T> callback)
 {
     _subscribers.Add(SubscriptionTopic.From(topicAsString), callback);
 }
コード例 #2
0
 public void Add(SubscriptionTopic topic, Action <string, T> callback)
 {
     _subscribers.Add(topic, callback);
 }