Bonsai.Core by Gonçalo Lopes

<PackageReference Include="Bonsai.Core" Version="2.2.0" />

 ObservableCombinators

public static class ObservableCombinators
Provides a set of static methods to aid in writing queries over observable sequences.
public static IObservable<TSource> Gate<TSource>(this IObservable<TSource> source, TimeSpan interval)

Takes the single next element from the sequence every time the specified interval elapses.

public static IObservable<TSource> Gate<TSource>(this IObservable<TSource> source, TimeSpan interval, IScheduler scheduler)

Takes the single next element from the sequence every time the specified interval elapses, using the specified scheduler to run gating timers.

public static IObservable<TSource> Gate<TSource, TGate>(this IObservable<TSource> source, IObservable<TGate> gate)

Takes the single next element from the sequence every time the gate produces an element.

public static IObservable<TSource> Gate<TSource, TGate>(this IObservable<TSource> source, IObservable<TGate> gate, TimeSpan timeSpan)

Takes the single next element from the sequence if this element is produced within a specified time interval after the gate produces an element.

public static IObservable<TSource> Gate<TSource, TGate>(this IObservable<TSource> source, IObservable<TGate> gate, TimeSpan timeSpan, IScheduler scheduler)

Takes the single next element from the sequence if this element is produced within a specified time interval after the gate produces an element, using the specified scheduler to run gate closing timers.

public static IObservable<TSource> Gate<TSource, TGateOpening, TGateClosing>(this IObservable<TSource> source, IObservable<TGateOpening> openGate, IObservable<TGateClosing> closeGate)

Takes the single next element from the sequence if this element is produced between a gate opening and gate closing event.

public static IObservable<TSource> GenerateWithThread<TSource>(Action<IObserver<TSource>> generator)

Generates a new observable sequence by starting a new Thread that applies the specified action on subscribed observers in a loop which recurs as fast as possible.

public static IConnectableObservable<TResult> Multicast<TSource, TResult>(this IObservable<TSource> source, Func<ISubject<TSource, TResult>> subjectFactory)

Returns a connectable observable sequence that upon connection causes the source to push results into a new fresh subject, which is created by invoking the specified subjectFactory.

public static IConnectableObservable<TSource> PublishReconnectable<TSource>(this IObservable<TSource> source)

Returns a connectable observable sequence that upon connection causes the source to push results into a new fresh Subject<T>.

public static IObservable<TResult> Zip<TSource1, TSource2, TResult>(this IObservable<TSource1> first, IEnumerable<TSource2> second, Func<TSource1, TSource2, TResult> resultSelector)

Merges an observable sequence and an enumerable sequence into one observable sequence by using the selector function.