public static IObservable <AsyncOperation> AsObservable(this AsyncOperation asyncOperation, IProgress <float> progress = null) { return(Observable.FromCoroutine <AsyncOperation>((IObserver <AsyncOperation> observer, CancellationToken cancellation) => AsyncOperationExtensions.AsObservableCore <AsyncOperation>(asyncOperation, observer, progress, cancellation))); }
public static IObservable <T> AsAsyncOperationObservable <T>(this T asyncOperation, IProgress <float> progress = null) where T : AsyncOperation { return(Observable.FromCoroutine <T>((IObserver <T> observer, CancellationToken cancellation) => AsyncOperationExtensions.AsObservableCore <T>(asyncOperation, observer, progress, cancellation))); }