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));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Добавляет подписку.
 /// </summary>
 public IDisposable Subscribe(string key, Action <string, string> handler)
 {
     return(_subscriptions.AddSubscription(key, handler));
 }