Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static partial class AsyncEnumerableExtensions
/// <typeparam name="TKey">The type of the key returned by <paramref name="keySelector"/>.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupBy<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -27,7 +27,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupBy<TS
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="comparer">An <see cref="IEqualityComparer{T}"/> to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupBy<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -44,7 +44,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupBy<TS
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupBy<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -62,7 +62,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupBy<T
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <param name="comparer">An <see cref="IEqualityComparer{T}"/> to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupBy<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class AsyncEnumerableExtensions
/// <typeparam name="TKey">The type of the key returned by keySelector.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwait<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -28,7 +28,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwa
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="comparer">An IEqualityComparer{T} to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwait<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -45,7 +45,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwa
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAwait<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -63,7 +63,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAw
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <param name="comparer">An IEqualityComparer{T} to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAwait<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class AsyncEnumerableExtensions
/// <typeparam name="TKey">The type of the key returned by keySelector.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwaitWithCancellation<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -28,7 +28,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwa
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="comparer">An IEqualityComparer{T} to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwaitWithCancellation<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -45,7 +45,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TSource>> AdjacentGroupByAwa
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAwaitWithCancellation<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -63,7 +63,7 @@ public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAw
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <param name="comparer">An IEqualityComparer{T} to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IAsyncGrouping<TKey, TElement>> AdjacentGroupByAwaitWithCancellation<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand Down
6 changes: 3 additions & 3 deletions Funcky.Async/Extensions/AsyncEnumerableExtensions/Inspect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static partial class AsyncEnumerableExtensions
/// <typeparam name="TSource">The inner type of the async enumerable.</typeparam>
/// <param name="source">An async enumerable.</param>
/// <param name="inspector">A synchronous action.</param>
/// <returns>Returns an <see cref="IEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
/// <returns>Returns an <see cref="IAsyncEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
[Pure]
public static IAsyncEnumerable<TSource> Inspect<TSource>(this IAsyncEnumerable<TSource> source, Action<TSource> inspector)
=> InspectInternal(source, inspector);
Expand All @@ -23,7 +23,7 @@ public static IAsyncEnumerable<TSource> Inspect<TSource>(this IAsyncEnumerable<T
/// <typeparam name="TSource">The inner type of the async enumerable.</typeparam>
/// <param name="source">An async enumerable.</param>
/// <param name="inspector">An asynchronous action.</param>
/// <returns>Returns an <see cref="IEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
/// <returns>Returns an <see cref="IAsyncEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
[Pure]
public static IAsyncEnumerable<TSource> InspectAwait<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask> inspector)
=> InspectAwaitInternal(source, inspector);
Expand All @@ -35,7 +35,7 @@ public static IAsyncEnumerable<TSource> InspectAwait<TSource>(this IAsyncEnumera
/// <typeparam name="TSource">The inner type of the async enumerable.</typeparam>
/// <param name="source">An async enumerable.</param>
/// <param name="inspector">An asynchronous action.</param>
/// <returns>Returns an <see cref="IEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
/// <returns>Returns an <see cref="IAsyncEnumerable{T}" /> with the side effect defined by action encoded in the enumerable.</returns>
[Pure]
public static IAsyncEnumerable<TSource> InspectAwaitWithCancellation<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, CancellationToken, ValueTask> inspector)
=> InspectAwaitWithCancellationInternal(source, inspector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ namespace Funcky.Extensions;
public static partial class AsyncEnumerableExtensions
{
/// <summary>
/// Materializes all the items of a lazy <see cref="IEnumerable{T}" />. If the underlying sequence is a collection type we do not actively enumerate them.
/// Materializes all the items of a lazy <see cref="IAsyncEnumerable{T}" />. If the underlying sequence is a collection type we do not actively enumerate them.
/// </summary>
/// <typeparam name="TSource">Type of the items in the source sequence.</typeparam>
/// <param name="source">The source sequence can be any <see cref="IEnumerable{T}" />.</param>
/// <param name="source">The source sequence can be any <see cref="IAsyncEnumerable{T}" />.</param>
/// <param name="cancellationToken">A cancellation token.</param>
/// <returns>A collection of the enumerated items.</returns>
public static async ValueTask<IReadOnlyCollection<TSource>> MaterializeAsync<TSource>(this IAsyncEnumerable<TSource> source, CancellationToken cancellationToken = default)
=> await source.MaterializeAsync(DefaultMaterializerAsync, cancellationToken).ConfigureAwait(false);

/// <summary>
/// Materializes all the items of a lazy <see cref="IEnumerable{T}" />. If the underlying sequence is a collection type we do not actively enumerate them.
/// Materializes all the items of a lazy <see cref="IAsyncEnumerable{T}" />. If the underlying sequence is a collection type we do not actively enumerate them.
/// Via the materialize function you can chose how the enumeration is done when it is needed.
/// </summary>
/// <typeparam name="TSource">Type of the items in the source sequence.</typeparam>
/// <typeparam name="TMaterialization">The type of the materialization target.</typeparam>
/// <param name="source">The source sequence can be any <see cref="IEnumerable{T}" />.</param>
/// <param name="source">The source sequence can be any <see cref="IAsyncEnumerable{T}" />.</param>
/// <param name="materializer">A function which materializes a given sequence into a collection.</param>
/// <param name="cancellationToken">A cancellation token.</param>
/// <returns>A collection of the enumerated items.</returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static ValueTask<ResultPartitions<TValidResult>> PartitionAsync<TValidRes
where TValidResult : notnull
=> source.PartitionAsync(ResultPartitions.Create, cancellationToken);

/// <summary>Partitions the either values in an <see cref="IEnumerable{T}"/> into an error and ok partition.</summary>
/// <inheritdoc cref="PartitionAsync{TValidResult}(IAsyncEnumerable{Result{TValidResult}},CancellationToken)"/>
public static async ValueTask<TResult> PartitionAsync<TValidResult, TResult>(
this IAsyncEnumerable<Result<TValidResult>> source,
Func<IReadOnlyList<Exception>, IReadOnlyList<TValidResult>, TResult> resultSelector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static partial class AsyncEnumerableExtensions
/// <typeparam name="TKey">The type of the key returned by <paramref name="keySelector"/>.</typeparam>
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IGrouping<TKey, TSource>> AdjacentGroupBy<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -28,7 +28,7 @@ public static IAsyncEnumerable<IGrouping<TKey, TSource>> AdjacentGroupBy<TSource
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="comparer">An <see cref="IEqualityComparer{T}"/> to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IGrouping<TKey, TSource>> AdjacentGroupBy<TSource, TKey>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -45,7 +45,7 @@ public static IAsyncEnumerable<IGrouping<TKey, TSource>> AdjacentGroupBy<TSource
/// <param name="source">The source sequence.</param>
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IGrouping<TKey, TElement>> AdjacentGroupBy<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand All @@ -63,7 +63,7 @@ public static IAsyncEnumerable<IGrouping<TKey, TElement>> AdjacentGroupBy<TSourc
/// <param name="keySelector">A function to extract the key for each element.</param>
/// <param name="elementSelector">A function to map each source element to an element in the <see cref ="IGrouping{TKey,TElement}" />.</param>
/// <param name="comparer">An <see cref="IEqualityComparer{T}"/> to compare keys.</param>
/// <returns>An <see cref="IEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
/// <returns>An <see cref="IAsyncEnumerable{T}" /> where each element is an <see cref ="IGrouping{TKey,TElement}" /> object containing a sequence of objects and a key.</returns>
[Pure]
public static IAsyncEnumerable<IGrouping<TKey, TElement>> AdjacentGroupBy<TSource, TKey, TElement>(
this IAsyncEnumerable<TSource> source,
Expand Down
Loading
Loading