Exemplo n.º 1
0
        public void SimpleSubject_DisposedBehavior()
        {
            var s = new SimpleSubject <int>();

            var d1 = s.Subscribe();

            for (int i = 0; i < 2; i++)
            {
                s.Dispose();

                Assert.ThrowsException <ObjectDisposedException>(() => s.OnNext(42));
                Assert.ThrowsException <ObjectDisposedException>(() => s.OnError(new Exception()));
                Assert.ThrowsException <ObjectDisposedException>(() => s.OnCompleted());

                d1.Dispose();

                Assert.ThrowsException <ObjectDisposedException>(() => s.Subscribe());
            }
        }
Exemplo n.º 2
0
 public void OnCompleted()
 {
     _signalSubject.OnCompleted();
 }
Exemplo n.º 3
0
 public void OnCompleted()
 {
     _executedSubject.OnCompleted();
 }