示例#1
0
        private void CheckAndMaybeRemoveHistoricJob(HistoricJob job)
        {
            var count = job.HistoricFiles.Count;

            job.HistoricFiles = job.HistoricFiles.Where(hf => _file.Exists(hf.Path)).ToList();

            if (!count.Equals(job.HistoricFiles.Count))
            {
                job.ChangedSinceCreation = true;
            }

            if (job.HistoricFiles.Count == 0)
            {
                lock (this)
                    History.Remove(job);
            }
        }
示例#2
0
 public void Remove(HistoricJob historicJob)
 {
     History.Remove(historicJob);
     RaiseHistoryChanged();
 }