public FileSystemChangeWatcher(FileSystemOperationsService fileSystemOperationsService, FilesPatternProvider filesPatternProvider) { this.fileSystemOperationsService = fileSystemOperationsService; this.filesPatternProvider = filesPatternProvider; }
private IList <ChangePoolEntry> RemoveSubdirectories(ISet <ChangePoolEntry> dirList) { IList <ChangePoolEntry> result = new List <ChangePoolEntry>(); foreach (ChangePoolEntry entry in dirList) { string dir = entry.PathChanged; if (dirList.Select(d => d.PathChanged).Where(d => d != dir).All(d => !FileSystemOperationsService.IsSubdirectory(d, dir))) { result.Add(entry); } } return(result); }
public FileSystemChangeNotifier(string name, FileSystemOperationsService fileSystemOperationsService) { this.fileSystemOperationsService = fileSystemOperationsService; this.Name = name; Task.Factory.StartNew(ChangeNotifier); }