Exemplo n.º 1
0
 private void pushBroker_OnNotificationFailed1(object sender, PushSharp.Core.INotification notification, Exception error)
 {
     this.BeginInvoke((Action)(() =>
     {
         MessageBox.Show(this, "Failed: " + Awpbs.TraceHelper.ExceptionToString(error), "Failed.");
     }));
 }
Exemplo n.º 2
0
 private void pushBroker_OnNotificationSent(object sender, PushSharp.Core.INotification notification)
 {
     this.BeginInvoke((Action)(() =>
     {
         MessageBox.Show(this, "Sent.", "Done");
     }));
 }
Exemplo n.º 3
0
        private void pushBroker_OnNotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error)
        {
            if (notification.Tag == null || notification.Tag is long == false)
            {
                return;
            }
            long id = (long)notification.Tag;

            // remember that the notification has failed
            try
            {
                var obj = db.PushNotifications.Where(i => i.PushNotificationID == id).FirstOrDefault();
                if (obj != null)
                {
                    obj.Status = (int)PushNotificationStatusEnum.SentOk;
                    db.SaveChanges();
                }
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 4
0
        private void NotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error)
        {
            ILog log = LogManager.GetLogger(this.GetType());

            log.Error(error);
        }
Exemplo n.º 5
0
        private void NotificationSent(object sender, PushSharp.Core.INotification notification)
        {
            ILog log = LogManager.GetLogger(this.GetType());

            log.Info("sent:" + notification);
        }
 static void push_OnDeviceSubscriptionExpired(object sender, string expiredSubscriptionId, DateTime expirationDateUtc, PushSharp.Core.INotification notification)
 {
     //TODO: Add event to Deactive the device from the database
 }
 void push_OnDeviceSubscriptionExpired(object sender, string expiredSubscriptionId, DateTime expirationDateUtc, PushSharp.Core.INotification notification)
 {
     if (!string.IsNullOrEmpty(expiredSubscriptionId))
     {
         _deviceRegistrationService.UnregisterDevice(expiredSubscriptionId);
     }
 }
 void _push_OnNotificationFailed(object sender, PushSharp.Core.INotification notification, Exception error)
 {
     new Telligent.Evolution.Components.CSException(Telligent.Evolution.Components.CSExceptionType.UnknownError, "An exception occurred while sending a push notification", error).Log();
 }