Esempio n. 1
0
        private bool ProcessPusherChannelEvent(string eventName, string channelName, string messageData)
        {
            bool processed = true;

            switch (eventName)
            {
            case Constants.CHANNEL_SUBSCRIPTION_SUCCEEDED:
                _pusher.SubscriptionSuceeded(channelName, messageData);
                break;

            case Constants.CHANNEL_SUBSCRIPTION_ERROR:
                _pusher.SubscriptionFailed(channelName, messageData);
                break;

            case Constants.CHANNEL_MEMBER_ADDED:
                _pusher.AddMember(channelName, messageData);
                break;

            case Constants.CHANNEL_MEMBER_REMOVED:
                _pusher.RemoveMember(channelName, messageData);
                break;

            default:
                processed = false;
                break;
            }

            return(processed);
        }