atsushieno/mono-reactive — pull request #14 by ugaya40 (2012-02-25 01:52:48+00:00)
Title: Fixed Observable.TakeWhile & Observable.Where Method.

Observable.Where method ignored "OnCompleted" && "OnError".
In Observable.TakeWhile methods, evaluation was wrong.

//--Problem--

var s1 = new Subject();

var source = s1.TakeWhile(i => i < 4);

source.Subscribe(i => Console.WriteLine("OnNext : " + i), i => Console.WriteLine("OnError"), () => Console.WriteLine("OnCompleted"));

s1.OnNext(1);
s1.OnNext(2);
s1.OnNext(3);
s1.OnNext(4);
s1.OnNext(5);
s1.OnNext(1);

s1.OnCompleted();

//--Actual Result--

OnNext : 4

//--Expect Result--

OnNext : 1
OnNext : 2
OnNext : 3
OnCompleted