System.Collections.Async.IAsyncEnumerableExtensions.BatchCollectionHelper.GetAddToCollectionAction()

Here are the examples of the csharp api class System.Collections.Async.IAsyncEnumerableExtensions.BatchCollectionHelper.GetAddToCollectionAction() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

Project: AsyncEnumerable
Source File: IAsyncEnumerableExtensions.cs
public static IAsyncEnumerable<TStandardCollection> Batch<TSource, TStandardCollection>(
            this IAsyncEnumerable<TSource> source,
            int batchSize)
        {
            return Batch(source, batchSize, long.MaxValue, null,
                BatchCollectionHelper<TSource>.GetCreateCollectionFunction<TStandardCollection>(),
                BatchCollectionHelper<TSource>.GetAddToCollectionAction<TStandardCollection>());
        }

2. Example

Project: AsyncEnumerable
Source File: IAsyncEnumerableExtensions.cs
public static IAsyncEnumerable<TStandardCollection> Batch<TSource, TStandardCollection>(
            this IAsyncEnumerable<TSource> source,
            long maxBatchWeight,
            Func<TSource, long> weightSelector)
        {
            return Batch(source, null, maxBatchWeight, weightSelector,
                BatchCollectionHelper<TSource>.GetCreateCollectionFunction<TStandardCollection>(),
                BatchCollectionHelper<TSource>.GetAddToCollectionAction<TStandardCollection>());
        }

3. Example

Project: AsyncEnumerable
Source File: IAsyncEnumerableExtensions.cs
public static IAsyncEnumerable<TStandardCollection> Batch<TSource, TStandardCollection>(
            this IAsyncEnumerable<TSource> source,
            int maxItemsInBatch,
            long maxBatchWeight,
            Func<TSource, long> weightSelector)
        {
            return Batch(source, maxItemsInBatch, maxBatchWeight, weightSelector,
                BatchCollectionHelper<TSource>.GetCreateCollectionFunction<TStandardCollection>(),
                BatchCollectionHelper<TSource>.GetAddToCollectionAction<TStandardCollection>());
        }