Is there any good example of poller class? Thread safe with wait handles, with background/foreground options and common start, stop, pause, resume calls?
I found examples like CruiseControl poller but ideally I would like to avoiding implementing IPollable every time I want to poll for something.
Thanks
I don’t know of a standard one other than the basic .NET timer class, but here’s a wrapper class for the .NET timer that uses a delegate rather than the IPollable interface of the wrapper you found. it also features a bit of locking and some methods that come in handy. you may want to extend and improve it yourself for pause/resume and logging, for example. good luck.