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
cursorReplayableSequence<T>.Cursorsizeint
Returns
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
cursorReplayableSequence<T>.CursorselectorFunc<T, TOut>
Returns
- IEnumerable<TOut>
Type Parameters
TTOut
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
cursorReplayableSequence<T>.CursorpredicateFunc<T, bool>
Returns
- IEnumerable<T>
Type Parameters
T