예제 #1
0
        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);
            }
        }
예제 #2
0
        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;
            }
        }
예제 #3
0
 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;
 }