public void AddScheduledTask(ScheduledTask task) { if (string.IsNullOrEmpty(task.TaskName)) { throw new Exception("Task name is empty"); } if (task.Interval == null) { throw new Exception("Task interval is null"); } if (ScheduledTasks == null) { ScheduledTasks = new List <ScheduledTask>(); } ScheduledTasks.Add(task); }
protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued) { ScheduledTasks.Add(task); return(false); }
protected override void QueueTask(Task task) { ScheduledTasks.Add(task); }