internal void RegisterSendMethod(Action <DateTime> method, string cron) { if (method == null) { throw new ArgumentNullException("method"); } if (string.IsNullOrEmpty(cron)) { throw new ArgumentNullException("cron"); } var w = new SendMethodWrapper(method, cron); lock (sendMethods) { if (!notifyScheduler.IsAlive) { notifyScheduler.Start(); } sendMethods.Remove(w); sendMethods.Add(w); } methodsEvent.Set(); }
internal void RegisterSendMethod(INotifyClient client, Action <DateTime> method, Func <DateTime, DateTime?> nextDate) { if (!Scheduling) { return; } if (client == null) { throw new ArgumentNullException("client"); } if (method == null) { throw new ArgumentNullException("method"); } if (nextDate == null) { throw new ArgumentNullException("nextDate"); } var w = new SendMethodWrapper(client, method, nextDate); lock (sendMethods) { if (!notifyScheduler.IsAlive) { notifyScheduler.Start(); } sendMethods.Remove(w); sendMethods.Add(w); } methodsEvent.Set(); }
internal void RegisterSendMethod(Action<DateTime> method, string cron) { if (method == null) throw new ArgumentNullException("method"); if (string.IsNullOrEmpty(cron)) throw new ArgumentNullException("cron"); var w = new SendMethodWrapper(method, cron); lock (sendMethods) { if (!notifyScheduler.IsAlive) { notifyScheduler.Start(); } sendMethods.Remove(w); sendMethods.Add(w); } methodsEvent.Set(); }
internal void RegisterSendMethod(INotifyClient client, Action<DateTime> method, Func<DateTime, DateTime?> nextDate) { if (!Scheduling) return; if (client == null) throw new ArgumentNullException("client"); if (method == null) throw new ArgumentNullException("method"); if (nextDate == null) throw new ArgumentNullException("nextDate"); var w = new SendMethodWrapper(client, method, nextDate); lock (sendMethods) { if (!notifyScheduler.IsAlive) { notifyScheduler.Start(); } sendMethods.Remove(w); sendMethods.Add(w); } methodsEvent.Set(); }