Exemplo n.º 1
0
 /// <summary>
 /// Delays the observable sequence by <paramref name="dueTime"/>.
 ///
 /// OnError notifications ARE NOT DELAYED!
 /// </summary>
 public static IObservableX <T> Delay <T>(this IObservableX <T> source, TimeSpan dueTime)
 {
     return(source.Map(_ => _.Delay(dueTime)));
 }
Exemplo n.º 2
0
 public static IObservableX <T> Repeat <T>(this IObservableX <T> source, int repeatCount)
 {
     return(source.Map(_ => _.Repeat(repeatCount)));
 }
Exemplo n.º 3
0
 public static IObservableX <IList <T> > ToList <T>(this IObservableX <T> source)
 {
     return(source.Map(_ => _.ToList()));
 }
Exemplo n.º 4
0
 public static IObservableX <T> SubscribeOnThreadPool <T>(this IObservableX <T> source)
 {
     return(source.Map(_ => _.SubscribeOn(Scheduler.ThreadPool)));
 }
Exemplo n.º 5
0
 public static IObservableX <T> Timeout <T>(this IObservableX <T> source, TimeSpan timeout)
 {
     return(source.Map(_ => _.Timeout(timeout)));
 }
Exemplo n.º 6
0
 public static IObservableX <T> Timeout <T>(this IObservableX <T> source, TimeSpan timeout, IObservableX <T> other)
 {
     return(source.Map(_ => _.Timeout(timeout, other.ToObservable())));
 }
Exemplo n.º 7
0
 public static IObservableX <T> Take <T>(this IObservableX <T> source, int count)
 {
     return(source.Map(_ => _.Take(count)));
 }
Exemplo n.º 8
0
 public static IObservableX <T> Catch <T, TException>(this IObservableX <T> source, Func <TException, IObservableX <T> > handler) where TException : Exception
 {
     return(source.Map(_ => _.Catch((TException exception) => handler(exception).ToObservable())));
 }
Exemplo n.º 9
0
        public static IObservableX <TResult> SelectMany <TSource, TCollection, TResult>(this IObservableX <TSource> source, Func <TSource, IObservableX <TCollection> > collectionSelector, Func <TSource, TCollection, TResult> resultSelector)
        {
            Func <TSource, IObservable <TCollection> > observableCollectionSelector = t => collectionSelector(t).ToObservable();

            return(source.Map(_ => _.SelectMany(observableCollectionSelector, resultSelector)));
        }
Exemplo n.º 10
0
 public static IObservableX <T> TakeWhile <T>(this IObservableX <T> source, Func <T, bool> predicate)
 {
     return(source.Map(_ => _.TakeWhile(predicate)));
 }
Exemplo n.º 11
0
        public static IObservableX <TResult> SelectMany <T, TResult>(this IObservableX <T> source, Func <T, IObservableX <TResult> > selector)
        {
            Func <T, IObservable <TResult> > observableSelector = t => selector(t).ToObservable();

            return(source.Map(_ => _.SelectMany(observableSelector)));
        }
Exemplo n.º 12
0
 public static IObservableX <TResult> SelectMany <T, TResult>(this IObservableX <T> source, Func <T, IEnumerable <TResult> > selector)
 {
     return(source.Map(_ => _.SelectMany(selector)));
 }
Exemplo n.º 13
0
 public static IObservableX <TResult> Select <T, TResult>(this IObservableX <T> source, Func <T, TResult> selector)
 {
     return(source.Map(_ => _.Select(selector)));
 }
Exemplo n.º 14
0
 public static IObservableX <T> Retry <T>(this IObservableX <T> source)
 {
     return(source.Map(_ => _.Retry()));
 }
Exemplo n.º 15
0
 public static IObservableX <T> Do <T>(this IObservableX <T> source, Action <T> action)
 {
     return(source.Map(_ => _.Do(action)));
 }
Exemplo n.º 16
0
 public static IObservableX <T> Retry <T>(this IObservableX <T> source, int retryCount)
 {
     return(source.Map(_ => _.Retry(retryCount)));
 }
Exemplo n.º 17
0
 public static IObservableX <T> Catch <T>(this IObservableX <T> source, IObservableX <T> second)
 {
     return(source.Map(_ => _.Catch(second.ToObservable())));
 }