Table of Contents

Class EveryOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

Implements the Every operator. Mirrors rxjs's every.

public static class EveryOperator
Inheritance
System.Object
EveryOperator

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

source Observable<T>

The source observable to test.

predicate Func<T, bool>

A function that tests each value.

Returns

Observable<bool>

An observable that emits a single boolean, then completes.

Type Parameters

T

The 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

source Observable<T>

The source observable to test.

predicate Func<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

T

The element type of the source observable.

Remarks

If predicate throws, the exception is forwarded via OnError.