/// <summary> /// An event that is call when notification successfully sent. /// </summary> /// <param name="sender"></param> /// <param name="notification"></param> private void NotificationSent(object sender, PushSharp.Core.INotification notification) { }
/// <summary> /// An event that is called when device subscrpition expired. /// </summary> /// <param name="sender"></param> /// <param name="expiredSubscriptionId"></param> /// <param name="expirationDateUtc"></param> /// <param name="notification"></param> private void DeviceSubscriptionExpired(object sender, string expiredSubscriptionId, DateTime expirationDateUtc, PushSharp.Core.INotification notification) { LogManager.CurrentInstance.ErrorLogger.LogError(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "Device subscription expired."); }
/// <summary> /// An event that is called when notification failed. /// </summary> /// <param name="sender"></param> /// <param name="notification"></param> /// <param name="error"></param> private void NotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error) { LogManager.CurrentInstance.ErrorLogger.LogError(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, error.Message); }
/// <summary> /// An event that is call when notification successfully sent. /// </summary> /// <param name="sender"></param> /// <param name="notification"></param> private void NotificationSent(object sender, PushSharp.Core.INotification notification) { LogManager.CurrentInstance.InfoLogger.LogInfo(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "Notification sent!!!", System.Reflection.MethodBase.GetCurrentMethod().Name); }
/// <summary> /// An event that is called when device subscription changed. /// </summary> /// <param name="sender"></param> /// <param name="oldSubscriptionId"></param> /// <param name="newSubscriptionId"></param> /// <param name="notification"></param> private void DeviceSubscriptionChanged(object sender, string oldSubscriptionId, string newSubscriptionId, PushSharp.Core.INotification notification) { LogManager.CurrentInstance.ErrorLogger.LogError(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, "Device subscription changed."); }
/// <summary> /// An event that is called when notification failed. /// </summary> /// <param name="sender"></param> /// <param name="notification"></param> /// <param name="error"></param> private void NotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error) { //Console.WriteLine("Notification Faild. ==> " + ((PushSharp.Apple.NotificationFailureException)(error)).ErrorStatusDescription); LogManager.CurrentInstance.ErrorLogger.LogError(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType, error.Message + " ==> " + ((PushSharp.Apple.NotificationFailureException)(error)).ErrorStatusCode.ToString() + "-" + ((PushSharp.Apple.NotificationFailureException)(error)).ErrorStatusDescription, System.Reflection.MethodBase.GetCurrentMethod().Name); }
private void NotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error) { }
private void DeviceSubscriptionExpired(object sender, string expiredSubscriptionId, DateTime expirationDateUtc, PushSharp.Core.INotification notification) { }
private void DeviceSubscriptionChanged(object sender, string oldSubscriptionId, string newSubscriptionId, PushSharp.Core.INotification notification) { }
/// <summary> /// An event that is call when notification successfully sent. /// </summary> /// <param name="sender"></param> /// <param name="notification"></param> private void NotificationSent(object sender, PushSharp.Core.INotification notification) { Console.WriteLine("Notification Sent."); }