Table of Contents

Class ReplayableSequenceExtensions

Namespace
PatternKit.Behavioral.Iterator
Assembly
PatternKit.Core.dll

LINQ-like and utility extensions over ReplayableSequence<T>.Cursor.

public static class ReplayableSequenceExtensions
Inheritance
ReplayableSequenceExtensions
Inherited Members

Methods

Batch<T>(Cursor, int)

Batch elements into fixed-size chunks (last batch may be smaller).

public static IEnumerable<IReadOnlyList<T>> Batch<T>(this ReplayableSequence<T>.Cursor cursor, int size)

Parameters

cursor ReplayableSequence<T>.Cursor
size int

Returns

IEnumerable<IReadOnlyList<T>>

Type Parameters

T

Select<T, TOut>(Cursor, Func<T, TOut>)

Project elements from a cursor using selector.

public static IEnumerable<TOut> Select<T, TOut>(this ReplayableSequence<T>.Cursor cursor, Func<T, TOut> selector)

Parameters

cursor ReplayableSequence<T>.Cursor
selector Func<T, TOut>

Returns

IEnumerable<TOut>

Type Parameters

T
TOut

Where<T>(Cursor, Func<T, bool>)

Filter elements from a cursor using predicate.

public static IEnumerable<T> Where<T>(this ReplayableSequence<T>.Cursor cursor, Func<T, bool> predicate)

Parameters

cursor ReplayableSequence<T>.Cursor
predicate Func<T, bool>

Returns

IEnumerable<T>

Type Parameters

T