private List <SourceEventArgs> RemoveDuplicates(List <SourceEventArgs> list) { list = list.OrderBy(z => z.FSWname).OrderBy(z => z.Path).ToList(); List <SourceEventArgs> newList = new List <SourceEventArgs>(); SourceEventArgs last1 = new SourceEventArgs(); last1.Path = "+"; last1.FSWname = ""; foreach (SourceEventArgs fswa in list) { if (fswa.FSWname != last1.FSWname || fswa.Path != last1.Path) { newList.Add(fswa); last1 = fswa; } } return(newList); }
void DirectoryMirror_FSWevent(SourceEventArgs fswEventArgs) { _timer.Start(); _IOlist.Add(fswEventArgs); }
void DirectoryMirror_FSWerror(SourceEventArgs fswEventArgs) { _timer.Start(); }