public IDisposable Subscribe(string key, Action <string, string> handler) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); } if (handler == null) { throw new ArgumentNullException(nameof(handler)); } return(_subscriptions.AddSubscription(key, handler)); }
/// <summary> /// Добавляет подписку. /// </summary> public IDisposable Subscribe(string key, Action <string, string> handler) { return(_subscriptions.AddSubscription(key, handler)); }