-
-
Save Igorbek/1cb1223f9520a617c9db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Reactive.Concurrency; | |
using System.Reactive.Linq; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
using (Observable.Range(0, 100, CurrentThreadScheduler.Instance) | |
.Do(x => Console.WriteLine("Generated: {0}", x)) | |
.Take(10) | |
.Subscribe(x => Console.WriteLine("Observed: {0}", x))) | |
{ | |
Console.WriteLine("Before yield"); | |
Console.ReadKey(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment