internal static void SendCallbackBasedOnType <T>(IJsonPluggableLibrary jsonPluggableLibrary, PubnubChannelCallback <T> channelCallbacks, List <object> itemMessage, CallbackType callbackType) { if (callbackType.Equals(CallbackType.Connect)) { GoToCallback <T> (itemMessage, channelCallbacks.ConnectCallback, jsonPluggableLibrary); } else if (callbackType.Equals(CallbackType.Disconnect)) { GoToCallback <T> (itemMessage, channelCallbacks.DisconnectCallback, jsonPluggableLibrary); } else if (callbackType.Equals(CallbackType.Success)) { GoToCallback <T> (itemMessage, channelCallbacks.SuccessCallback, jsonPluggableLibrary); } else if (callbackType.Equals(CallbackType.Wildcard)) { GoToCallback <T> (itemMessage, channelCallbacks.WildcardPresenceCallback, jsonPluggableLibrary); } }
internal static void SendCallbacks <T>(IJsonPluggableLibrary jsonPluggableLibrary, RequestState <T> asynchRequestState, List <object> itemMessage, CallbackType callbackType, bool checkType) { if (asynchRequestState.ChannelEntities != null) { SendCallbacks <T> (jsonPluggableLibrary, asynchRequestState.ChannelEntities, itemMessage, callbackType, checkType); } else { #if (ENABLE_PUBNUB_LOGGING) LoggingMethod.WriteToLog(string.Format("DateTime {0}, SendCallbacks1: Callback type={1}", DateTime.Now.ToString(), callbackType.ToString()), LoggingMethod.LevelInfo); #endif if (callbackType.Equals(CallbackType.Success)) { GoToCallback <T> (itemMessage, asynchRequestState.SuccessCallback, jsonPluggableLibrary); } } }