public IseFileReloader(IseIntegrator iseIntegrator) { this.IseIntegrator = iseIntegrator; this.IseFileWatchers = new Dictionary <string, IseFileWatcher>(); this.PathsToIgnore = new HashSet <string>(); this.FileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierIseReloader"); this.FileSystemChangeNotifier.FileSystemChanged += OnIseFileChangedBatch; this.IseIntegrator.AttachFileCollectionChangedHandler(this.OnIseFilesCollectionChanged); }
public IseFileWatcher(FileSystemChangeNotifier fileSystemChangeNotifier, string path, ISEFile iseFile) { this.IseFile = iseFile; this.FileSystemChangeNotifier = fileSystemChangeNotifier; this.Watcher = new FileSystemWatcher(Path.GetDirectoryName(path), Path.GetFileName(path)); this.Watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite | NotifyFilters.CreationTime | NotifyFilters.Security; this.Watcher.Changed += OnFileChanged; this.Watcher.Deleted += OnFileChanged; this.Watcher.Renamed += OnFileRenamed; this.Watcher.EnableRaisingEvents = true; }
public void startWatching() { this.fileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierIseReloader", this.fileSystemOperationsService); this.fileSystemChangeNotifier.FileSystemChanged += OnIseFileChangedBatch; this.iseIntegrator.AttachFileCollectionChangedHandler(this.OnIseFilesCollectionChanged); }