private static void AsyncToObservableWithExceptionExample() { var classWithAsyncMethod = new ClassWithAsyncMethod(); Console.WriteLine("Starting long operation"); Observable.FromAsync(classWithAsyncMethod.WithException).Dump("async example"); }
private static void AsyncToObservableExample() { var classWithAsyncMethod = new ClassWithAsyncMethod(); Console.WriteLine("Starting long operation"); var subscription = Observable.FromAsync(classWithAsyncMethod.WithResultAsync).Dump("async example"); Console.ReadKey(); subscription.Dispose(); }