Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 protected override bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)
 {
     ScheduledTasks.Add(task);
     return(false);
 }
Esempio n. 3
0
 protected override void QueueTask(Task task)
 {
     ScheduledTasks.Add(task);
 }