Beispiel #1
0
        public void OnJobProgress(long jobId, float progress)
        {
            using var scope       = scopeFactory.CreateScope();
            using var dataContext = scope.ServiceProvider.GetRequiredService <DataContext>();

            var job = dataContext.Jobs.Find(jobId);

            job.Progress = progress;

            JobProgress?.Invoke(this, new JobProgressEventArgs()
            {
                Job = job, Progress = progress
            });
        }
Beispiel #2
0
 protected virtual void OnJobProgress(JobProgressEventArgs e) => JobProgress?.Invoke(this, e);