Beispiel #1
0
        private async SystemTasks.Task LoadJob(IMergeableJob job)
        {
            var loadJob = new Func <IMergeableJob>(() =>
            {
                return(!_jobScheduler.Exists(j => j.Name.Equals(job.Name)) ? AddJob(job) : ReplaceJob(job));
            });

            if (_jobScheduler.Exists(j => j.Name.Equals(job.Name)))
            {
                return;
            }
            var loadedJob = loadJob();

            await AddTrigger(loadedJob);
        }
Beispiel #2
0
 private IMergeableJob AddJob(IMergeableJob job)
 {
     _jobScheduler.Add(job);
     return(job);
 }
Beispiel #3
0
 private async SystemTasks.Task AddTrigger(IMergeableJob job)
 {
     await AddTrigger(job.GetNextOccurrence());
 }