AsyncDataPipeline<T>
Models & Types · AiDotNet.Data.Pipeline
Provides async data pipeline operations with prefetching support.
Implements: IAsyncEnumerable<T>
Methods
| Method | Summary |
|---|---|
AsyncDataPipeline<T> Filter(Func<T, bool> predicate) |
Filters elements based on a predicate. |
AsyncDataPipeline<T> Prefetch(int bufferSize) |
Prefetches elements in the background for improved performance. |
AsyncDataPipeline<T> Take(int count) |
Takes only the first N elements. |
AsyncDataPipeline<TResult> Map(Func<T, TResult> selector) |
Applies a transformation function to each element. |
AsyncDataPipeline<TResult> MapAsync(Func<T, CancellationToken, Task<TResult>> selector) |
Applies an async transformation function to each element. |
AsyncDataPipeline<T[]> Batch(int batchSize, bool dropRemainder) |
Groups elements into batches. |
IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken) |