public static IObservable <TRet> ContinueAfter <T, TRet>(this IObservable <T> observable, Func <IObservable <TRet> > selector, IScheduler scheduler) { return(observable.AsCompletion().ObserveOn(scheduler).SelectMany(_ => selector())); }
public static IObservable <TRet> ContinueAfter <T, TRet>(this IObservable <T> observable, Func <IObservable <TRet> > selector, System.Reactive.Concurrency.IScheduler scheduler) { return(observable.AsCompletion <T>().ObserveOn(scheduler).SelectMany((Unit _) => selector())); }
/// <summary> /// from here http://haacked.com/archive/2012/10/08/writing-a-continueafter-method-for-rx.aspx/ /// </summary> /// <typeparam name="T"></typeparam> /// <typeparam name="TRet"></typeparam> /// <param name="observable"></param> /// <param name="selector"></param> /// <returns></returns> public static IObservable <TRet> WithContinuation <T, TRet>( this IObservable <T> observable, Func <IObservable <TRet> > selector) { return(observable.AsCompletion().SelectMany(_ => selector())); }
public static IObservable <TRet> ContinueAfter <T, TRet>(this IObservable <T> observable, Func <IObservable <TRet> > selector) { return(observable.AsCompletion <T>().SelectMany((Unit _) => selector())); }