C# Class Story.Core.Utils.FileWatcher

File watcher calls callback when the watched file is updated with the content of the file
Inheritance: IDisposable
Datei anzeigen Open project: narratr/story Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
FileWatcher ( string watchedPath, Action onFileChanged ) : System

Initializes a new instance of the FileWatcher class. Will invoke callback with current file content

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
DisposeWatcher ( ) : void
OnChanged ( object sender, FileSystemEventArgs e ) : void
OnError ( object sender, ErrorEventArgs e ) : void
OnFileUpdated ( object state ) : void
ResetWatcher ( ) : void
StartWatcher ( ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

FileWatcher() public method

Initializes a new instance of the FileWatcher class. Will invoke callback with current file content
public FileWatcher ( string watchedPath, Action onFileChanged ) : System
watchedPath string The watched path.
onFileChanged Action The on file changed callback.
return System