private void UpdateStatus() { switch (status) { case Status.WAITING: case Status.PROCESSING: if (_currentNotification < notifications.Count) { NotificationData notif = notifications[_currentNotification]; switch (notif.status) { case NotificationData.Status.SLEEPING: notif.MarkAsWaiting(); _status = Status.WAITING; break; case NotificationData.Status.WAITING: _status = Status.WAITING; break; case NotificationData.Status.PROCESSING: _status = Status.PROCESSING; break; case NotificationData.Status.RESOLVED: ++_currentNotification; UpdateStatus(); break; case NotificationData.Status.UNKNOWN: default: Logger.Instance.Log("ERROR", "Ill-formated notification skipped"); ++_currentNotification; UpdateStatus(); break; } } else { _status = Status.RESOLVED; } break; case Status.SLEEPING: case Status.RESOLVED: case Status.UNKNOWN: default: break; } }