public IDisposable Run() { T t; if (parent.valueFactory == null) { t = parent.value; } else { try { t = parent.valueFactory(); } catch (Exception ex) { try { observer.OnError(ex); } finally { Dispose(); } return(Disposable.Empty); } } OnNext(t); return(parent.source.Subscribe(base.observer)); // good bye StartWithObserver }
public IDisposable Run() { T value; if (parent.valueFactory == null) { value = parent.value; } else { try { value = parent.valueFactory(); } catch (Exception error) { try { observer.OnError(error); } finally { Dispose(); } return(Disposable.Empty); } } OnNext(value); return(parent.source.Subscribe(observer)); }