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); } }
public void Remove(HistoricJob historicJob) { History.Remove(historicJob); RaiseHistoryChanged(); }