예제 #1
0
 public static IObservable <TRet> ContinueAfter <T, TRet>(this IObservable <T> observable, Func <IObservable <TRet> > selector, IScheduler scheduler)
 {
     return(observable.AsCompletion().ObserveOn(scheduler).SelectMany(_ => selector()));
 }
예제 #2
0
 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()));
 }
예제 #3
0
 /// <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()));
 }
예제 #4
0
 public static IObservable <TRet> ContinueAfter <T, TRet>(this IObservable <T> observable, Func <IObservable <TRet> > selector)
 {
     return(observable.AsCompletion <T>().SelectMany((Unit _) => selector()));
 }