File watcher calls callback when the watched file is updated with the content of the file
Inheritance: IDisposable
Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.fileWatcher != null)
         {
             this.fileWatcher.Dispose();
             this.fileWatcher = null;
         }
     }
 }
Example #2
0
 public FileBasedStoryFactory(string path, Func<object[]> rulesetConstructorArgsProvider = null)
 {
     this.fileWatcher = new FileWatcher(path, OnFileChanged);
     this.rulesetConstructorArgsProvider = rulesetConstructorArgsProvider ?? (() => new object[0]);
 }