LeeCampbell / RxCookbook

Collection of recipes and snippets helping you create useful Rx code
280 stars 39 forks source link

FileWatcher sample #23

Open LeeCampbell opened 8 years ago

LeeCampbell commented 8 years ago

Provide help to questions like [http://codereview.stackexchange.com/questions/89961/rx-net-file-watcher]

Walk through the issues with FileSystemWatcher and then link back to polling solution from #22

LeeCampbell commented 8 years ago
var fsw = new FileSystemWatcher(".");

var fileChangedStream = Observable.FromEventPattern<FileSystemEventHandler, FileSystemEventArgs>(
    handler => fsw.Changed += handler,
    handler => fsw.Changed -= handler)
LeeCampbell commented 7 years ago

https://aspnetcore.slack.com/archives/rx/p1481549187000056