private void PushMessage(RESPArray message)
        {
            var subscribers  = Subscriptions.GetSubscribedTo(message);
            var notification = RedisNotification.ParseArray(message);

            foreach (var channel in subscribers.Cast <RedisChannel>())
            {
                Task.Run(() => channel.PushMessage(notification));
            }
        }
Exemple #2
0
        public void PushMessage(RedisNotification message)
        {
            Contract.Assert(message != null, "Trying to notify a null message.");
            CheckDispose();

            var handler = NotificationHandler;

            if (handler != null)
            {
                try
                {
                    handler(message);
                }
                catch (Exception)
                {}
            }
        }