private void FireConfigPathChanged(string newPath) { if (this.ConfigFileChanged != null) { var args = new FileChangedEventArgs() { NewPath = newPath }; this.ConfigFileChanged(this, args); } }
/// <summary> /// Real filewatch works, only, if the path is correctly configured. /// Changing the path after the watch is created, doesnt raise any event. /// </summary> private void ConfigFilePathChanged(object sender, FileChangedEventArgs e) { this.fileWatcher = this.initializeFileWatcher(e.NewPath); this.fileWatcher.FileChanged += this.ConfigFileChanged; }