Skip to content

Add Window and Buffer overloads to allow specifying maximum time length and element count when window/buffer opening is controlled by another sequence #128

Open
@glopesdev

Description

@glopesdev

Basically, add the following overloads to Window (respectively for Buffer):

public static IObservable<IObservable<TSource>> Window<TSource, TWindowOpening>(
    this IObservable<TSource> source,
    IObservable<TWindowOpening> windowOpenings,
    TimeSpan timeSpan,
    IScheduler scheduler
)

public static IObservable<IObservable<TSource>> Window<TSource, TWindowOpening>(
    this IObservable<TSource> source,
    IObservable<TWindowOpening> windowOpenings,
    int count
)

public static IObservable<IObservable<TSource>> Window<TSource, TWindowOpening>(
    this IObservable<TSource> source,
    IObservable<TWindowOpening> windowOpenings,
    TimeSpan timeSpan,
    int count,
    IScheduler scheduler
)

This would allow using external events to specify the opening of overlapping windows while using the traditional element count and time length conditions to automatically close the windows.

Note that so far as I understand it, there is no trivial implementation for the _count_ overload, even if you wanted to implement this using the existing overload with window closing factory. It would be exceedingly useful to have this built into the framework for completeness.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions