/// <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); }
public void Add(SubscriptionTopic topic, Action <string, T> callback) { _subscribers.Add(topic, callback); }