Esempio n. 1
0
 private static IObservable <TOutput> prependAction <TElement, TInput, TOutput>(this IObservable <TElement> observable, RxAction <TInput, TOutput> action, TInput input)
 {
     return(observable
            .SelectValue(default(TOutput))
            .IgnoreElements()
            .Concat(
                Observable.Defer(() => action.ExecuteWithCompletion(input))
                ));
 }
Esempio n. 2
0
        private static IObservable <TOutput> executeSequentally <TInput, TOutput>(this RxAction <TInput, TOutput> action,
                                                                                  IEnumerable <TInput> inputs)
        {
            var observables = inputs
                              .Select(input => Observable.Defer(() => action.ExecuteWithCompletion(input)));

            return(Observable.Concat(
                       observables
                       ));
        }