protected override IDisposable SubscribeCore(IObserver <T> observer, IDisposable cancel) { observer = new Defer(observer, cancel); IObservable <T> source; try { source = observableFactory(); } catch (Exception ex) { source = Observable.Throw <T>(ex); } return(source.Subscribe(observer)); }
protected override IDisposable SubscribeCore(UniRx.IObserver <T> observer, IDisposable cancel) { observer = new Defer(observer, cancel); UniRx.IObservable <T> observable; try { observable = observableFactory(); } catch (Exception error) { observable = Observable.Throw <T>(error); } return(observable.Subscribe(observer)); }