Class BufferCount
Represents an operator that projects each element of the sequence into zero or more buffers based on element count information.
BufferCount
groups the notifications of the source sequence into chunks containing the number of elements specified in the Count property. The overlap between the elements in each chunk can be controlled using the Skip property.
If no skip value is provided, the chunks will be strictly non-overlapping, with a new chunk beginning when the previous chunk ends. If the skip value is less than the specified number of elements, chunks will be overlapping, with a new buffer created every Skip
notifications. Finally, if the skip value is greater than the specified number of elements, there will be a gap between each chunk where elements from the source sequence will be dropped.
[Combinator]
public class BufferCount
- Inheritance
-
BufferCount
- Inherited Members
Properties
Count
Gets or sets the number of elements in each buffer.
public int Count { get; set; }
Property Value
Skip
Gets or sets the number of elements to skip between the creation of consecutive buffers.
public int? Skip { get; set; }
Property Value
- int?
Remarks
If no value is specified, the operator will generate consecutive non-overlapping buffers.
Methods
Process<TSource>(IObservable<TSource>)
Projects each element of an observable sequence into zero or more buffers based on element count information.
public IObservable<IList<TSource>> Process<TSource>(IObservable<TSource> source)
Parameters
source
IObservable<TSource>The source sequence to produce buffers over.
Returns
- IObservable<IList<TSource>>
An observable sequence of buffers.
Type Parameters
TSource
The type of the elements in the
source
sequence.