/// <summary> /// Removes a JobInfo from the Queue /// </summary> /// <param name="jobInfo">The JobInfo to remove</param> /// <param name="deleteFiles">If true, the inf and source files will be deleted</param> /// <returns>true, if successful</returns> public bool Remove(IJobInfo jobInfo, bool deleteFiles) { _jobFileSet.Remove(jobInfo.InfFile); if (deleteFiles) { jobInfo.Delete(true); } return(JobInfos.Remove(jobInfo)); }
/// <summary> /// Merge this JobInfo with another /// </summary> /// <param name="jobInfo">The JobInfo to merge with. Its source files will be added at the end of the source file list</param> public void Merge(IJobInfo jobInfo) { if (jobInfo.JobType != JobType) { return; } foreach (var sourceFile in jobInfo.SourceFiles) { SourceFiles.Add(sourceFile); } jobInfo.Delete(false); }