public void TransferredEvent(UpdateJob transferredJob) { if (OnJobTransferred != null) { OnJobTransferred.Invoke(this, new UpdateJobEventArgs(transferredJob)); } }
public void ModificationEvent(UpdateJob modifiedJob) { if (OnJobModification != null) { OnJobModification.Invoke(this, new UpdateJobEventArgs(modifiedJob)); } }
public void ErrorEvent(UpdateJob errorJob, IBackgroundCopyError errorInfo) { if (OnJobError != null) { OnJobError.Invoke(this, new UpdateJobErrorEventArgs(errorJob, errorInfo)); } }
public UpdateJob CreateJob(String jobName, String description, Int64 retryPeriod, Int64 retryDelay) { IBackgroundCopyJob newJob; GUID newJobID; try { copyManager.CreateJob(jobName, BG_JOB_TYPE.BG_JOB_TYPE_DOWNLOAD, out newJobID, out newJob); UpdateJob myJob = new UpdateJob(newJob); myJob.Description = description; //if (retryPeriod != DEFAULT_RETRY_PERIOD) myJob.NoProgressTimeout = DEFAULT_RETRY_PERIOD; //if (retryDelay != DEFAULT_RETRY_DELAY) myJob.MinimumRetryDelay = DEFAULT_RETRY_DELAY; return(myJob); } catch (COMException ex) { throw new Exception(String.Format("Error Creating Job ({0}).", ex.Message)); } }
public UpdateJobEventArgs(UpdateJob job) { CopyJob = job; DisplayName = job.DisplayName; }
public void AddJob(UpdateJob jobToMonitor) { AddJob(jobToMonitor, JobNotificationType.JobError | JobNotificationType.JobTransferred); }
public void AddJob(UpdateJob jobToMonitor, JobNotificationType notifyType) { jobToMonitor.NotifyInterface = callback; jobToMonitor.NotifyFlags = notifyType; }
public UpdateJobErrorEventArgs(UpdateJob eventJob, IBackgroundCopyError errorInfo) : base(eventJob) { this.errorInfo = errorInfo; }