Table of Contents

Class WindowOperator

Namespace
RxSharp.Operators
Assembly
RxSharp.dll

The window operator.

public static class WindowOperator
Inheritance
System.Object
WindowOperator

Methods

Window<T, TBoundary>(Observable<T>, Observable<TBoundary>)

Branches out source's values as a nested Observable<T> that opens immediately and closes (completing) each time boundary emits, opening a new one right away. Mirrors rxjs's window: boundary is subscribed exactly once, for the whole lifetime of the output — unlike WindowWhen<T, TBoundary>(Observable<T>, Func<Observable<TBoundary>>), it is not re-subscribed per window. boundary completing does not close (or otherwise affect) the current window or the output — it simply means no further window boundaries will occur.

public static Observable<Observable<T>> Window<T, TBoundary>(this Observable<T> source, Observable<TBoundary> boundary)

Parameters

source Observable<T>

The source observable.

boundary Observable<TBoundary>

Each emission closes the current window and opens a new one.

Returns

Observable<Observable<T>>

An observable of windows, each itself an observable of the values collected during its lifetime.

Type Parameters

T

The element type of the source.

TBoundary

The (unused) element type of boundary.