Class SkipWhileOperator
Implements the SkipWhile operator. Mirrors rxjs's skipWhile.
public static class SkipWhileOperator
- Inheritance
-
System.ObjectSkipWhileOperator
Methods
SkipWhile<T>(Observable<T>, Func<T, bool>)
Skips values from source for as long as predicate returns
true, then emits that value and every value after it, unchanged.
public static Observable<T> SkipWhile<T>(this Observable<T> source, Func<T, bool> predicate)
Parameters
sourceObservable<T>The source observable to skip values from.
predicateFunc<T, bool>A function that tests each value while skipping is still in effect.
Returns
- Observable<T>
An observable that starts emitting once
predicatefirst returns false.
Type Parameters
TThe element type of the source observable.
Remarks
Equivalent to the indexed overload with the index ignored. If predicate throws, the exception is forwarded via OnError.
SkipWhile<T>(Observable<T>, Func<T, int, bool>)
Skips values from source for as long as predicate, called with the
value and its zero-based emission index, returns true, then emits that value and every
value after it, unchanged.
public static Observable<T> SkipWhile<T>(this Observable<T> source, Func<T, int, bool> predicate)
Parameters
sourceObservable<T>The source observable to skip values from.
predicateFunc<T, int, bool>A function that tests each value together with its index, while skipping is still in effect.
Returns
- Observable<T>
An observable that starts emitting once
predicatefirst returns false.
Type Parameters
TThe element type of the source observable.
Remarks
Once predicate has returned false for the first time, it is never
invoked again for the rest of the subscription — this is a "sticky" transition, matching rxjs's
skipWhile exactly. If predicate throws, the exception is forwarded via OnError.