public int AddNotification4(string type, string message, object userData, DateTime date, TimeSpan period, long nbOccurences, bool fixedRate) { int notifId; TimerNotificationInfo info; lock (_notifications) { notifId = _currentNotificationId; info = new TimerNotificationInfo(notifId, type, message, userData, date, period, nbOccurences, fixedRate, HandleTimerCallback, CheckSendPastNotifications); _currentNotificationId++; _notifications[notifId] = info; } if (_isActive) { info.Start(); } return(notifId); }
public int AddNotification4(string type, string message, object userData, DateTime date, TimeSpan period, long nbOccurences, bool fixedRate) { int notifId; TimerNotificationInfo info; lock (_notifications) { notifId = _currentNotificationId; info = new TimerNotificationInfo(notifId, type, message, userData, date, period, nbOccurences, fixedRate, HandleTimerCallback, CheckSendPastNotifications); _currentNotificationId++; _notifications[notifId] = info; } if (_isActive) { info.Start(); } return notifId; }