I have an event that fires (potentially) every second (a timer tick). What I'd like to do is take the last tick's EventArgs value every 60 seconds (if there were new ticks during those 60 seconds). I tried doing something like:
Observable.FromEventPattern(
h => myThing.SomeEvent += h,
h => myThing.SomeEvent -= h)
.Throttle(TimeSpan.FromSeconds(60))
.TakeLast(1)
.Do(p => // do something with p);
Unfortunately I never get to the Do method, and I'm not sure what I'm doing wrong?
Apologies if this is completely wrong, my first time using Rx :)
Edit: Per suggestions below, I changed Do to Subscribe, but I still don't get any results, if I use Throttle. Should I be using it at all?