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