private static JobInfoDto FromJob(JobDecorator job) { return(new JobInfoDto() { Id = job.Id, Name = job.Name, Progress = job.Progress, Status = job.Status, ScheduledAt = job.RecurrencePeriod?.NextRunAt }); }
private void EnQueueJob(IJob job, Recurrence recurrence) { if (job == null) { return; } var decoratedJob = new JobDecorator(job, recurrence); _jobs[decoratedJob.Id] = decoratedJob; decoratedJob.Notifier = this; _notificationsBroker.OnJobAdded(FromJob(decoratedJob)); }