Observable.Buffer<TSource, TBufferClosing> Method (IObservable<TSource>, Func<IObservable<TBufferClosing>>)
Indicates each element of an observable sequence into consecutive non-overlapping buffers.
Namespace: System.Reactive.Linq
Assembly: System.Reactive (in System.Reactive.dll)
public static IObservable<IList<TSource>> Buffer<TSource, TBufferClosing>( this IObservable<TSource> source, Func<IObservable<TBufferClosing>> bufferClosingSelector )
Type Parameters
- TSource
The type of source.
- TBufferClosing
The type of observable sequence whose elements denote the closing of each produced buffer.
Parameters
- source
- Type: System.IObservable<TSource>
The source sequence to produce buffers over.
- bufferClosingSelector
- Type: System.Func<IObservable<TBufferClosing>>
A function invoked to define the boundaries of the produced buffers. A new buffer is started when the previous one is closed.