public IseFileReloader(IseIntegrator iseIntegrator)
 {
     IseIntegrator = iseIntegrator;
     IseFileWatchers = new Dictionary<string, IseFileWatcher>();
     PathsToIgnore = new HashSet<string>();
     FileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierIseReloader");
     FileSystemChangeNotifier.FileSystemChanged += OnIseFileChangedBatch;
     IseIntegrator.AttachFileCollectionChangedHandler(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 FileSystemChangeWatcher(EventHandler<FileSystemChangedInfo> fileSystemChangedEvent)
 {
     FileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierReindexWatcher");
     FileSystemChangeNotifier.FileSystemChanged += fileSystemChangedEvent;
     Watcher = new FileSystemWatcher();
 }
Beispiel #4
0
 public void RegisterOnChangeCallback(EventHandler <FileSystemChangedInfo> fileSystemChangedEvent)
 {
     this.fileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierReindexWatcher", this.fileSystemOperationsService);
     this.fileSystemChangeNotifier.FileSystemChanged += fileSystemChangedEvent;
     this.watcher = new FileSystemWatcher();
 }
 public void RegisterOnChangeCallback(EventHandler<FileSystemChangedInfo> fileSystemChangedEvent)
 {
     this.fileSystemChangeNotifier = new FileSystemChangeNotifier("PsISEPE-FileSystemNotifierReindexWatcher", this.fileSystemOperationsService);
     this.fileSystemChangeNotifier.FileSystemChanged += fileSystemChangedEvent;
     this.watcher = new FileSystemWatcher();
 }