This below example was my attempt at doing this:
var source
= Observable.Sample(
Observable.Range(1, int.MaxValue), TimeSpan.FromSeconds(2));
But when I .Subscribe() to that Observable and output it to the console, it shows a sequence like this, one line output every 2 seconds:
OnNext: 312969
OnNext: 584486
OnNext: 862009
Obviously the .Range() observable is running while the .Sample() observable is waiting 2 seconds between each output. I would like to know how to create an observable but that does not allow values to be skipped, so obviously that would look like this:
OnNext: 1
OnNext: 2
OnNext: 3
With one value from .Range() output every 2 seconds. How can I accomplish this in the Reactive Extensions for .NET?