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()); } }
public void OnCompleted() { _signalSubject.OnCompleted(); }
public void OnCompleted() { _executedSubject.OnCompleted(); }