0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Rx-Mainを試す

0
Posted at

Rx-Mainを試してみた。
Mac+Xamarin Studio
endもmain waitも呼ばれないので想定通り。

using System;
using System.Reactive;
using System.Reactive.Linq;
namespace p2
{
	class MainClass
	{
		public static void Main (string[] args)
		{
			Observable.Create <string> (
				observer => {
					Console.WriteLine ("start");

					while (true) {
						observer.OnNext (Console.ReadLine ());
					}
					return () => Console.WriteLine ("end");
				}).Subscribe(s => Console.WriteLine ("subscribe:" + s ));
			Console.WriteLine ("main wait");
			Console.ReadLine ();
		}
	}
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?