LongoMatch.Services.RenderingJobsManager.CancelJob C# (CSharp) Method

CancelJob() public method

public CancelJob ( LongoMatch.Common.Job job ) : void
job LongoMatch.Common.Job
return void
        public void CancelJob(Job job)
        {
            if (currentJob != job)
                return;

            if (job is EditionJob) {
                videoEditor.Progress -= OnProgress;
                videoEditor.Error -= OnError;
                videoEditor.Cancel ();
            } else {
                videoConverter.Progress -= OnProgress;
                videoConverter.Error -= OnError;
                videoConverter.Cancel ();
            }
            job.State = JobState.Cancelled;
            RemoveCurrentFromPending ();
            UpdateJobsStatus ();
            StartNextJob ();
        }