Class SessionWindowExtensions
- Namespace
- Scaleout.Streaming.TimeWindowing.Linq
- Assembly
- Scaleout.Streaming.TimeWindowing.dll
Provides extension method for session windowing.
public static class SessionWindowExtensions
- Inheritance
-
SessionWindowExtensions
- Inherited Members
Methods
ToSessionWindows<TSource>(IEnumerable<TSource>, Func<TSource, DateTime>, TimeSpan)
Transforms a collection into an enumerable collection of session windows. The source collection must be sorted chronologically.
public static IEnumerable<ITimeWindow<TSource>> ToSessionWindows<TSource>(this IEnumerable<TSource> source, Func<TSource, DateTime> timestampSelector, TimeSpan idleThreshold)
Parameters
sourceIEnumerable<TSource>The sequence of elements to transform.
timestampSelectorFunc<TSource, DateTime>A function to extract a timestamp from an element.
idleThresholdTimeSpanMaximum allowed time gap between elements before a new session window is started.
Returns
- IEnumerable<ITimeWindow<TSource>>
An enumerable set of ITimeWindow<TElement> collections.
Type Parameters
TSourceThe type of objects in the source collection.