public IObservable <TElement> Process <TElement>(IObservable <TElement> source, IObservable <Random> random) { return(source.ToArray().Zip( random.FirstAsync(), (elements, randomSource) => CombinatoricsHelper.SelectCombination(elements, Count, randomSource)) .SelectMany(elements => elements)); }
public IObservable <TElement[]> Process <TElement>(IObservable <TElement[]> source, IObservable <Random> random) { return(random.FirstAsync().SelectMany(randomSource => source.Select(elements => CombinatoricsHelper.SelectCombination(elements, Count, randomSource)))); }
public IObservable <TElement[]> Process <TElement>(IObservable <TElement[]> source) { return(source.Select(elements => CombinatoricsHelper.SelectCombination(elements, Count))); }
public IObservable <TElement> Process <TElement>(IObservable <TElement> source) { return(source.ToArray().SelectMany(elements => CombinatoricsHelper.SelectCombination(elements, Count))); }