private bool FileWasMerged(FileInfo fi) { LastMergedFileInfo lmf = currentlyMerged.FirstOrDefault(lmfi => lmfi.FileName.ToLower() == fi.FullName.ToLower()); if (lmf != null) { return(lmf.LastTouched.Equals(fi.LastWriteTime) || lmf.LastTouched == DateTime.MinValue); } else { return(false); } }
private void updateMergedList(String fileName, DateTime lasttouched) { int index = currentlyMerged.FindIndex(lmf => lmf.FileName == fileName); LastMergedFileInfo lmfi = new LastMergedFileInfo() { FileName = fileName, LastTouched = lasttouched, }; if (index == -1) { currentlyMerged.Add(lmfi); } else { currentlyMerged[index] = lmfi; } }
private void updateMergedList(String fileName, DateTime lasttouched) { int index = currentlyMerged.FindIndex(lmf => lmf.FileName == fileName); LastMergedFileInfo lmfi = new LastMergedFileInfo() { FileName = fileName, LastTouched = lasttouched, }; if (index == -1) currentlyMerged.Add(lmfi); else currentlyMerged[index] = lmfi; }