Class EveryOperator
Implements the Every operator. Mirrors rxjs's every.
public static class EveryOperator
- Inheritance
-
System.ObjectEveryOperator
Methods
Every<T>(Observable<T>, Func<T, bool>)
Emits a single boolean: true if every value from source satisfies
predicate (checked once source completes), or false
as soon as one value fails it — completing immediately at that point without waiting for
source itself to complete.
public static Observable<bool> Every<T>(this Observable<T> source, Func<T, bool> predicate)
Parameters
sourceObservable<T>The source observable to test.
predicateFunc<T, bool>A function that tests each value.
Returns
- Observable<bool>
An observable that emits a single boolean, then completes.
Type Parameters
TThe element type of the source observable.
Remarks
If predicate throws, the exception is forwarded via OnError.
Every<T>(Observable<T>, Func<T, int, bool>)
Emits a single boolean: true if every value from source satisfies
predicate (called with the value and its zero-based emission index, checked once
source completes), or false as soon as one value fails it —
completing immediately at that point without waiting for source itself to complete.
public static Observable<bool> Every<T>(this Observable<T> source, Func<T, int, bool> predicate)
Parameters
sourceObservable<T>The source observable to test.
predicateFunc<T, int, bool>A function that tests each value together with its index since subscription.
Returns
- Observable<bool>
An observable that emits a single boolean, then completes.
Type Parameters
TThe element type of the source observable.
Remarks
If predicate throws, the exception is forwarded via OnError.