From c9acefcb75b92d20e58dfcc5edaa455c43aa21a2 Mon Sep 17 00:00:00 2001 From: akarnokd Date: Thu, 28 Nov 2019 16:13:06 +0100 Subject: [PATCH 1/2] Add documentation to AsyncEnumerable methods. --- .../System.Linq.Async.csproj | 7 +- .../System/Linq/IOrderedAsyncEnumerable.cs | 29 +++ .../System/Linq/Operators/Aggregate.cs | 40 ++++ .../System/Linq/Operators/All.cs | 10 + .../System/Linq/Operators/Any.cs | 19 ++ .../System/Linq/Operators/AppendPrepend.cs | 16 ++ .../Linq/Operators/AsAsyncEnumerable.cs | 7 + .../Linq/Operators/Average.Generated.cs | 190 ++++++++++++++++++ .../Linq/Operators/Average.Generated.tt | 24 +++ .../System/Linq/Operators/Cast.cs | 7 + .../System/Linq/Operators/Concat.cs | 8 + .../System/Linq/Operators/Contains.cs | 21 ++ .../System/Linq/Operators/Count.cs | 20 ++ .../System/Linq/Operators/DefaultIfEmpty.cs | 15 ++ .../System/Linq/Operators/Distinct.cs | 17 ++ .../System/Linq/Operators/ElementAt.cs | 11 + .../Linq/Operators/ElementAtOrDefault.cs | 10 + .../System/Linq/Operators/Empty.cs | 5 + .../System/Linq/Operators/Except.cs | 17 ++ .../System/Linq/Operators/First.cs | 19 ++ .../System/Linq/Operators/FirstOrDefault.cs | 17 ++ .../System/Linq/Operators/ForEach.cs | 20 ++ .../System/Linq/Operators/GroupBy.cs | 42 ++++ .../System/Linq/Operators/GroupJoin.cs | 29 +++ .../System/Linq/Operators/Intersect.cs | 17 ++ .../System/Linq/Operators/Join.cs | 29 +++ .../System/Linq/Operators/Last.cs | 19 ++ .../System/Linq/Operators/LastOrDefault.cs | 17 ++ .../System/Linq/Operators/LongCount.cs | 20 ++ .../System/Linq/Operators/Max.cs | 20 ++ .../System/Linq/Operators/Min.cs | 20 ++ .../System/Linq/Operators/MinMax.Generated.cs | 140 +++++++++++++ .../System/Linq/Operators/MinMax.Generated.tt | 12 ++ .../System/Linq/Operators/OfType.cs | 7 + .../System/Linq/Operators/OrderBy.cs | 76 +++++++ .../System/Linq/Operators/Range.cs | 7 + .../System/Linq/Operators/Repeat.cs | 8 + .../System/Linq/Operators/Reverse.cs | 7 + .../System/Linq/Operators/Select.cs | 18 ++ .../System/Linq/Operators/SelectMany.cs | 40 ++++ .../System/Linq/Operators/SequenceEqual.cs | 21 ++ .../System/Linq/Operators/Single.cs | 19 ++ .../System/Linq/Operators/SingleOrDefault.cs | 19 ++ .../System/Linq/Operators/Skip.cs | 9 + .../System/Linq/Operators/SkipLast.cs | 13 ++ .../System/Linq/Operators/SkipWhile.cs | 17 ++ .../System/Linq/Operators/Sum.Generated.cs | 180 +++++++++++++++++ .../System/Linq/Operators/Sum.Generated.tt | 23 +++ .../System/Linq/Operators/Take.cs | 9 + .../System/Linq/Operators/TakeLast.cs | 13 ++ .../System/Linq/Operators/TakeWhile.cs | 17 ++ .../System/Linq/Operators/ToArray.cs | 9 + .../Operators/ToAsyncEnumerable.Observable.cs | 7 + .../Linq/Operators/ToAsyncEnumerable.Task.cs | 7 + .../Linq/Operators/ToAsyncEnumerable.cs | 7 + .../System/Linq/Operators/ToDictionary.cs | 50 +++++ .../System/Linq/Operators/ToEnumerable.cs | 7 + .../System/Linq/Operators/ToHashSet.cs | 19 ++ .../System/Linq/Operators/ToList.cs | 9 + .../System/Linq/Operators/ToLookup.cs | 50 +++++ .../System/Linq/Operators/ToObservable.cs | 7 + .../System/Linq/Operators/Union.cs | 17 ++ .../System/Linq/Operators/Where.cs | 16 ++ .../System/Linq/Operators/Zip.cs | 11 + 64 files changed, 1611 insertions(+), 2 deletions(-) diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index 8f5e3a9624..5cb58c8b40 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -23,8 +23,7 @@ - + @@ -88,4 +87,8 @@ + + + + diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs index e064a118ba..1d0447d12b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/IOrderedAsyncEnumerable.cs @@ -8,12 +8,41 @@ namespace System.Linq { + /// + /// Represents a sorted async-enumerable sequence. + /// + /// The type of the elements of the sequence. public interface IOrderedAsyncEnumerable : IAsyncEnumerable { + /// + /// Performs a subsequent ordering on the elements of an ordered async-enumerable according to a key. + /// + /// The type of the key produced by keySelector. + /// The function used to extract the key for each element. + /// The comparer used to compare keys for placement in the returned sequence. + /// true to sort the elements in descending order; false to sort the elements in ascending order. + /// An ordered async-enumerable whose elements are sorted according to a key. IOrderedAsyncEnumerable CreateOrderedEnumerable(Func keySelector, IComparer? comparer, bool descending); + + /// + /// Performs a subsequent ordering on the elements of an ordered async-enumerable according to a key provided via a ValueTask. + /// + /// The type of the key produced by keySelector. + /// The function used to extract the key for each element as a ValueTask. + /// The comparer used to compare keys for placement in the returned sequence. + /// true to sort the elements in descending order; false to sort the elements in ascending order. + /// An ordered async-enumerable whose elements are sorted according to a key. IOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer? comparer, bool descending); #if !NO_DEEP_CANCELLATION + /// + /// Performs a subsequent ordering on the elements of an ordered async-enumerable according to a key provided via a ValueTask. + /// + /// The type of the key produced by keySelector. + /// The function used to extract the key for each element as a ValueTask supporting cancellation. + /// The comparer used to compare keys for placement in the returned sequence. + /// true to sort the elements in descending order; false to sort the elements in ascending order. + /// An ordered async-enumerable whose elements are sorted according to a key. IOrderedAsyncEnumerable CreateOrderedEnumerable(Func> keySelector, IComparer? comparer, bool descending); #endif } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs index 81e27b9374..376822197e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Aggregate.cs @@ -10,6 +10,18 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. + /// For aggregation behavior with incremental intermediate results, see System.Interactive.Async.AsyncEnumerableEx.Scan{TSource}. + /// + /// The type of the elements in the source sequence and the result of the aggregation. + /// An async-enumerable sequence to aggregate over. + /// An accumulator function to be invoked on each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the final accumulator value. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AggregateAsync(this IAsyncEnumerable source, Func accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -99,6 +111,19 @@ static async ValueTask Core(IAsyncEnumerable source, Func + /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value. + /// For aggregation behavior with incremental intermediate results, see System.Interactive.Async.AsyncEnumerableEx.Scan{TSource, Accumulate}". + /// + /// The type of the elements in the source sequence. + /// The type of the result of the aggregation. + /// An async-enumerable sequence to aggregate over. + /// The initial accumulator value. + /// An accumulator function to be invoked on each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the final accumulator value. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func accumulator, CancellationToken cancellationToken = default) { if (source == null) @@ -167,6 +192,21 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA } #endif + /// + /// Applies an accumulator function over an async-enumerable sequence, returning the result of the aggregation as a single element in the result sequence. The specified seed value is used as the initial accumulator value, + /// and the specified result selector function is used to select the result value. + /// + /// The type of the elements in the source sequence. + /// The type of the accumulator value. + /// The type of the resulting value. + /// An async-enumerable sequence to aggregate over. + /// The initial accumulator value. + /// An accumulator function to be invoked on each element. + /// A function to transform the final accumulator value into the result value. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the final accumulator value. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AggregateAsync(this IAsyncEnumerable source, TAccumulate seed, Func accumulator, Func resultSelector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs index df9e0898df..5f175466eb 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs @@ -10,6 +10,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Determines whether all elements of an async-enumerable sequence satisfy a condition. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose elements to apply the predicate to. + /// A function to test each element for a condition. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element determining whether all elements in the source sequence pass the test in the specified predicate. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AllAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs index 9f3956e5f6..1695705745 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Any.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Determines whether an async-enumerable sequence contains any elements. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to check for non-emptiness. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element determining whether the source sequence contains any elements. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AnyAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -25,6 +34,16 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellation } } + /// + /// Determines whether any element of an async-enumerable sequence satisfies a condition. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose elements to apply the predicate to. + /// A function to test each element for a condition. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element determining whether any elements in the source sequence pass the test in the specified predicate. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AnyAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs index a6f856bfed..0789d68e91 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AppendPrepend.cs @@ -12,6 +12,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Append a value to an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source sequence to append the value to. + /// Element to append to the specified sequence. + /// The source sequence appended with the specified value. + /// is null. public static IAsyncEnumerable Append(this IAsyncEnumerable source, TSource element) { if (source == null) @@ -25,6 +33,14 @@ public static IAsyncEnumerable Append(this IAsyncEnumerable(source, element, appending: true); } + /// + /// Prepend a value to an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source sequence to prepend the value to. + /// Element to prepend to the specified sequence. + /// The source sequence prepended with the specified value. + /// is null. public static IAsyncEnumerable Prepend(this IAsyncEnumerable source, TSource element) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs index 074d1b7e3b..67e38d0fed 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/AsAsyncEnumerable.cs @@ -10,6 +10,13 @@ public static partial class AsyncEnumerable { // NB: Synchronous LINQ to Objects doesn't hide the implementation of the source either. + /// + /// Hides the identity of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose identity to hide. + /// An async-enumerable sequence that hides the identity of the source sequence. + /// is null. public static IAsyncEnumerable AsAsyncEnumerable(this IAsyncEnumerable source) => source; } } diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs index fdbb89c713..c22d99bbc9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -42,6 +50,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -146,6 +165,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -178,6 +205,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -282,6 +320,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -314,6 +360,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -418,6 +475,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -450,6 +515,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -554,6 +630,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -586,6 +670,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -690,6 +785,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -730,6 +833,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -858,6 +972,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -898,6 +1020,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1026,6 +1159,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1066,6 +1207,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1194,6 +1346,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1234,6 +1394,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -1362,6 +1533,14 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask AverageAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1402,6 +1581,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask AverageAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt index 6c754caaed..f8f34a7a54 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Average.Generated.tt @@ -44,7 +44,20 @@ foreach (var o in os) res = "sum / count"; else if (t == "float") res = "(float)(sum / count)"; + + var typeStr = o.type; + if (isNullable) { + typeStr = "Nullable{" + o.type.Substring(0, 1).ToUpper() + o.type.Substring(1, o.type.Length - 2) + "}"; + } #> + /// + /// Computes the average of an async-enumerable sequence of values. + /// + /// A sequence of values to calculate the average of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask<<#=o.res#>> AverageAsync(this IAsyncEnumerable<<#=o.type#>> source, CancellationToken cancellationToken = default) { if (source == null) @@ -117,6 +130,17 @@ else } } + /// + /// Computes the average of an async-enumerable sequence of nullable values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values to calculate the average of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the average of the sequence of values, or null if the source sequence is empty or contains only values that are null. + /// or is null. + /// (Asynchronous) The source sequence is empty. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask<<#=o.res#>> AverageAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs index 986982da8b..a345db4690 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Cast.cs @@ -13,6 +13,13 @@ public static partial class AsyncEnumerable // NB: This is a non-standard LINQ operator, because we don't have a non-generic IAsyncEnumerable. // We're keeping it to enable `from T x in xs` binding in C#. + /// + /// Converts the elements of an async-enumerable sequence to the specified type. + /// + /// The type to convert the elements in the source sequence to. + /// The async-enumerable sequence that contains the elements to be converted. + /// An async-enumerable sequence that contains each element of the source sequence converted to the specified type. + /// is null. public static IAsyncEnumerable Cast(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs index dfb150e3d1..c5f02e320d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Concat.cs @@ -11,6 +11,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Concatenates the second async-enumerable sequence to the first async-enumerable sequence upon successful termination of the first. + /// + /// The type of the elements in the source sequences. + /// First async-enumerable sequence. + /// Second async-enumerable sequence. + /// An async-enumerable sequence that contains the elements of the first sequence, followed by those of the second the sequence. + /// or is null. public static IAsyncEnumerable Concat(this IAsyncEnumerable first, IAsyncEnumerable second) { if (first == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs index b30025a8f8..b3a8ea4d18 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Contains.cs @@ -10,10 +10,31 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Determines whether an async-enumerable sequence contains a specified element by using the default equality comparer. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence in which to locate a value. + /// The value to locate in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element determining whether the source sequence contains an element that has the specified value. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask ContainsAsync(this IAsyncEnumerable source, TSource value, CancellationToken cancellationToken = default) => source is ICollection collection ? new ValueTask(collection.Contains(value)) : ContainsAsync(source, value, comparer: null, cancellationToken); + /// + /// Determines whether an async-enumerable sequence contains a specified element by using a specified System.Collections.Generic.IEqualityComparer{T}. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence in which to locate a value. + /// The value to locate in the source sequence. + /// An equality comparer to compare elements. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element determining whether the source sequence contains an element that has the specified value. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask ContainsAsync(this IAsyncEnumerable source, TSource value, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs index 492163af4f..d38f536279 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Count.cs @@ -11,6 +11,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns an async-enumerable sequence containing an that represents the total number of elements in an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence that contains elements to be counted. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the number of elements in the input sequence. + /// is null. + /// (Asynchronous) The number of elements in the source sequence is larger than . + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask CountAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -40,6 +50,16 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA } } + /// + /// Returns an async-enumerable sequence containing an that represents how many elements in the specified async-enumerable sequence satisfy a condition. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence that contains elements to be counted. + /// A function to test each element for a condition. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a number that represents how many elements in the input sequence satisfy the condition in the predicate function. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask CountAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs index ce8beee328..7b2c949c8c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/DefaultIfEmpty.cs @@ -11,9 +11,24 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the elements of the specified sequence or the type parameter's default value in a singleton sequence if the sequence is empty. + /// + /// The type of the elements in the source sequence (if any), whose default value will be taken if the sequence is empty. + /// The sequence to return a default value for if it is empty. + /// An async-enumerable sequence that contains the default value for the TSource type if the source is empty; otherwise, the elements of the source itself. + /// is null. public static IAsyncEnumerable DefaultIfEmpty(this IAsyncEnumerable source) => DefaultIfEmpty(source, default!); + /// + /// Returns the elements of the specified sequence or the specified value in a singleton sequence if the sequence is empty. + /// + /// The type of the elements in the source sequence (if any), and the specified default value which will be taken if the sequence is empty. + /// The sequence to return the specified value for if it is empty. + /// The value to return if the sequence is empty. + /// An async-enumerable sequence that contains the specified default value if the source is empty; otherwise, the elements of the source itself. + /// is null. public static IAsyncEnumerable DefaultIfEmpty(this IAsyncEnumerable source, TSource defaultValue) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs index 3c7585bfb9..2076136e9c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Distinct.cs @@ -10,8 +10,25 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns an async-enumerable sequence that contains only distinct elements. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to retain distinct elements for. + /// An async-enumerable sequence only containing the distinct elements from the source sequence. + /// is null. + /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. public static IAsyncEnumerable Distinct(this IAsyncEnumerable source) => Distinct(source, comparer: null); + /// + /// Returns an async-enumerable sequence that contains only distinct elements according to the comparer. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to retain distinct elements for. + /// Equality comparer for source elements. + /// An async-enumerable sequence only containing the distinct elements from the source sequence. + /// or is null. + /// Usage of this operator should be considered carefully due to the maintenance of an internal lookup structure which can grow large. public static IAsyncEnumerable Distinct(this IAsyncEnumerable source, IEqualityComparer? comparer) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs index b1dbeb2039..fac678281b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAt.cs @@ -10,6 +10,17 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the element at a specified index in a sequence. + /// + /// The type of the elements in the source sequence. + /// async-enumerable sequence to return the element from. + /// The zero-based index of the element to retrieve. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence that produces the element at the specified position in the source sequence. + /// is null. + /// is less than zero. + /// (Asynchronous) is greater than or equal to the number of elements in the source sequence. public static ValueTask ElementAtAsync(this IAsyncEnumerable source, int index, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs index 1c85edb3d0..7aa8b0e0a6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ElementAtOrDefault.cs @@ -10,6 +10,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the element at a specified index in a sequence or a default value if the index is out of range. + /// + /// The type of the elements in the source sequence. + /// async-enumerable sequence to return the element from. + /// The zero-based index of the element to retrieve. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence that produces the element at the specified position in the source sequence, or a default value if the index is outside the bounds of the source sequence. + /// is null. + /// is less than zero. public static ValueTask ElementAtOrDefaultAsync(this IAsyncEnumerable source, int index, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs index e0727f69c2..72f784cd27 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Empty.cs @@ -10,6 +10,11 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns an empty async-enumerable sequence. + /// + /// The type used for the type parameter of the resulting sequence. + /// An async-enumerable sequence with no elements. public static IAsyncEnumerable Empty() => EmptyAsyncIterator.Instance; internal sealed class EmptyAsyncIterator : IAsyncPartition, IAsyncEnumerator diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs index 4b5492dd7b..36f1561f7b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Except.cs @@ -10,9 +10,26 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Produces the set difference of two async-enumerable sequences by using the default equality comparer to compare values. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose elements that are not also in second will be returned. + /// An async-enumerable sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence. + /// A sequence that contains the set difference of the elements of two sequences. + /// or is null public static IAsyncEnumerable Except(this IAsyncEnumerable first, IAsyncEnumerable second) => Except(first, second, comparer: null); + /// + /// Produces the set difference of two async-enumerable sequences by using the specified equality comparer to compare values. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose elements that are not also in second will be returned. + /// An async-enumerable sequence whose elements that also occur in the first sequence will cause those elements to be removed from the returned sequence. + /// An equality comparer to compare values. + /// A sequence that contains the set difference of the elements of two sequences. + /// or is null. public static IAsyncEnumerable Except(this IAsyncEnumerable first, IAsyncEnumerable second, IEqualityComparer? comparer) { if (first == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs index bf78886f0d..c74f3fb68d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/First.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the first element of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the first element in the async-enumerable sequence. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask FirstAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -25,6 +34,16 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + /// + /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the first element in the async-enumerable sequence that satisfies the condition in the predicate. + /// or is null. + /// (Asynchronous) No element satisfies the condition in the predicate. -or- The source sequence is empty. public static ValueTask FirstAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs index d15acdb427..cc8e32a695 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/FirstOrDefault.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the first element of an async-enumerable sequence, or a default value if no such element exists. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the first element in the async-enumerable sequence, or a default value if no such element exists. + /// is null. public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -25,6 +33,15 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + /// + /// Returns the first element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the first element in the async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. + /// or is null. public static ValueTask FirstOrDefaultAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs index 9ca1e73416..38f96ab2f1 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ForEach.cs @@ -17,6 +17,16 @@ public static partial class AsyncEnumerable // want to keep these methods, they may be a candidate for System.Interactive.Async if we consider them to be // non-standard (i.e. IEnumerable doesn't have a ForEach extension method either). + /// + /// Invokes an action for each element in the async-enumerable sequence, and returns a Task object that will get signaled when the sequence terminates. + /// + /// The type of the elements in the source sequence. + /// Source sequence. + /// Action to invoke for each element in the async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// Task that signals the termination of the sequence. + /// or is null. + /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11. public static Task ForEachAsync(this IAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) { if (source == null) @@ -35,6 +45,16 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA } } + /// + /// Invokes an action for each element in the async-enumerable sequence, incorporating the element's index, and returns a Task object that will get signaled when the sequence terminates. + /// + /// The type of the elements in the source sequence. + /// Source sequence. + /// Action to invoke for each element in the async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// Task that signals the termination of the sequence. + /// or is null. + /// This operator is especially useful in conjunction with the asynchronous programming features introduced in C# 5.0 and Visual Basic 11. public static Task ForEachAsync(this IAsyncEnumerable source, Action action, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs index 23b8f8aadc..1be1d45161 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupBy.cs @@ -10,9 +10,28 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Groups the elements of an async-enumerable sequence according to a specified key selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the grouping key computed for each element in the source sequence. + /// An async-enumerable sequence whose elements to group. + /// A function to extract the key for each element. + /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. + /// or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector) => new GroupedAsyncEnumerable(source, keySelector, comparer: null); + /// + /// Groups the elements of an async-enumerable sequence according to a specified key selector function and comparer. + /// + /// The type of the elements in the source sequence. + /// The type of the grouping key computed for each element in the source sequence. + /// An async-enumerable sequence whose elements to group. + /// A function to extract the key for each element. + /// An equality comparer to compare keys with. + /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. + /// or or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerable(source, keySelector, comparer); @@ -30,9 +49,32 @@ public static partial class AsyncEnumerable new GroupedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer); #endif + /// + /// Groups the elements of an async-enumerable sequence and selects the resulting elements by using a specified function. + /// + /// The type of the elements in the source sequence. + /// The type of the grouping key computed for each element in the source sequence. + /// The type of the elements within the groups computed for each element in the source sequence. + /// An async-enumerable sequence whose elements to group. + /// A function to extract the key for each element. + /// A function to map each source element to an element in an async-enumerable group. + /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. + /// or or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector) => new GroupedAsyncEnumerable(source, keySelector, elementSelector, comparer: null); + /// + /// Groups the elements of an async-enumerable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. + /// + /// The type of the elements in the source sequence. + /// The type of the grouping key computed for each element in the source sequence. + /// The type of the elements within the groups computed for each element in the source sequence. + /// An async-enumerable sequence whose elements to group. + /// A function to extract the key for each element. + /// A function to map each source element to an element in an async-enumerable group. + /// An equality comparer to compare keys with. + /// A sequence of async-enumerable groups, each of which corresponds to a unique key value, containing all elements that share that same key value. + /// or or or is null. public static IAsyncEnumerable> GroupBy(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? comparer) => new GroupedAsyncEnumerable(source, keySelector, elementSelector, comparer); diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs index 568776d14d..426cf800d8 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/GroupJoin.cs @@ -10,9 +10,38 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Correlates the elements of two async-enumerable sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys. + /// + /// The type of the elements of the first async-enumerable sequence. + /// The type of the elements of the second async-enumerable sequence. + /// The type of the keys returned by the key selector functions. + /// The type of the result elements. + /// The first async-enumerable sequence to join. + /// The async-enumerable sequence to join to the first sequence. + /// A function to extract the join key from each element of the first sequence. + /// A function to extract the join key from each element of the second sequence. + /// A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + /// An async-enumerable sequence that contains elements of type TResult that are obtained by performing a grouped join on two sequences. + /// or or or or is null. public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector) => GroupJoin(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + /// + /// Correlates the elements of two async-enumerable sequences based on equality of keys and groups the results. The specified equality comparer is used to compare keys. + /// + /// The type of the elements of the first async-enumerable sequence. + /// The type of the elements of the second async-enumerable sequence. + /// The type of the keys returned by the key selector functions. + /// The type of the result elements. + /// The first async-enumerable sequence to join. + /// The async-enumerable sequence to join to the first async-enumerable sequence. + /// A function to extract the join key from each element of the first sequence. + /// A function to extract the join key from each element of the second sequence. + /// A function to create a result element from an element from the first sequence and a collection of matching elements from the second sequence. + /// An equality comparer to hash and compare keys. + /// An async-enumerable sequence that contains elements of type TResult that are obtained by performing a grouped join on two sequences. + /// or or or or is null. public static IAsyncEnumerable GroupJoin(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func, TResult> resultSelector, IEqualityComparer? comparer) { if (outer == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs index 8df716533d..5b100a3414 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Intersect.cs @@ -10,9 +10,26 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Produces the set intersection of two async-enumerable sequences by using the default equality comparer to compare values. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose distinct elements that also appear in second will be returned. + /// An async-enumerable sequence whose distinct elements that also appear in the first sequence will be returned. + /// A sequence that contains the elements that form the set intersection of two sequences. + /// or is null. public static IAsyncEnumerable Intersect(this IAsyncEnumerable first, IAsyncEnumerable second) => Intersect(first, second, comparer: null); + /// + /// Produces the set intersection of two async-enumerable sequences by using the specified equality comparer to compare values. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose distinct elements that also appear in second will be returned. + /// An async-enumerable sequence whose distinct elements that also appear in the first sequence will be returned. + /// An equality comparer to compare values. + /// A sequence that contains the elements that form the set intersection of two sequences. + /// or is null. public static IAsyncEnumerable Intersect(this IAsyncEnumerable first, IAsyncEnumerable second, IEqualityComparer? comparer) { if (first == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs index a5bf97a4c3..e68c011ac6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Join.cs @@ -10,9 +10,38 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys. + /// + /// The type of the elements of the first async-enumerable sequence. + /// The type of the elements of the second async-enumerable sequence. + /// The type of the keys returned by the key selector functions. + /// The type of the result elements. + /// The first async-enumerable sequence to join. + /// The async-enumerable sequence to join to the first sequence. + /// A function to extract the join key from each element of the first sequence. + /// A function to extract the join key from each element of the second sequence. + /// A function to create a result element from two matching elements. + /// An async-enumerable sequence that has elements of type TResult that are obtained by performing an inner join on two sequences. + /// or or or or is null. public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector) => Join(outer, inner, outerKeySelector, innerKeySelector, resultSelector, comparer: null); + /// + /// Correlates the elements of two sequences based on matching keys. A specified equality comparer is used to compare keys. + /// + /// The type of the elements of the first async-enumerable sequence. + /// The type of the elements of the second async-enumerable sequence. + /// The type of the keys returned by the key selector functions. + /// The type of the result elements. + /// The first async-enumerable sequence to join. + /// The async-enumerable sequence to join to the first sequence. + /// A function to extract the join key from each element of the first sequence. + /// A function to extract the join key from each element of the second sequence. + /// A function to create a result element from two matching elements. + /// An equality comparer to hash and compare keys. + /// An async-enumerable sequence that has elements of type TResult that are obtained by performing an inner join on two sequences. + /// or or or or is null. public static IAsyncEnumerable Join(this IAsyncEnumerable outer, IAsyncEnumerable inner, Func outerKeySelector, Func innerKeySelector, Func resultSelector, IEqualityComparer? comparer) { if (outer == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs index c249fe5e40..05bb7ac3bc 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Last.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the last element of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the last element in the async-enumerable sequence. + /// is null. + /// (Asynchronous) The source sequence is empty. public static ValueTask LastAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -25,6 +34,16 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + /// + /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the last element in the async-enumerable sequence that satisfies the condition in the predicate. + /// or is null. + /// (Asynchronous) No element satisfies the condition in the predicate. -or- The source sequence is empty. public static ValueTask LastAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs index c076682fb4..785521133e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LastOrDefault.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the last element of an async-enumerable sequence, or a default value if no such element exists. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the last element in the async-enumerable sequence, or a default value if no such element exists. + /// is null. public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -25,6 +33,15 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + /// + /// Returns the last element of an async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the last element in the async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. + /// or is null. public static ValueTask LastOrDefaultAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs index 9bb4a74e66..0ded5cc3dc 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/LongCount.cs @@ -10,6 +10,16 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns an async-enumerable sequence containing an that represents the total number of elements in an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence that contains elements to be counted. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the number of elements in the input sequence. + /// is null. + /// (Asynchronous) The number of elements in the source sequence is larger than . + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask LongCountAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -33,6 +43,16 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA } } + /// + /// Returns an async-enumerable sequence containing an that represents how many elements in the specified async-enumerable sequence satisfy a condition. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence that contains elements to be counted. + /// A function to test each element for a condition. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a number that represents how many elements in the input sequence satisfy the condition in the predicate function. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask LongCountAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs index 5e047eeec0..fd7027c5aa 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Max.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the maximum element in an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to determine the maximum element of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum element in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -86,6 +95,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Invokes a transform function on each element of a sequence and returns the maximum value. + /// + /// The type of the elements in the source sequence. + /// The type of the objects derived from the elements in the source sequence to determine the maximum of. + /// An async-enumerable sequence to determine the minimum element of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the value that corresponds to the maximum element in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask MaxAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs index 5bbdbfb75d..9e35a3956e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Min.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the minimum element in an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to determine the minimum element of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum element in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -87,6 +96,17 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Invokes a transform function on each element of a sequence and returns the minimum value. + /// + /// The type of the elements in the source sequence. + /// The type of the objects derived from the elements in the source sequence to determine the minimum of. + /// An async-enumerable sequence to determine the minimum element of. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask sequence containing a single element with the value that corresponds to the minimum element in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask MinAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs index ff6dcfd401..c0e8b53147 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.cs @@ -10,6 +10,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -154,6 +161,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -454,6 +468,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -598,6 +619,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -898,6 +926,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1102,6 +1137,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1386,6 +1428,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1590,6 +1639,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -1874,6 +1930,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2018,6 +2081,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the maximum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the maximum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the maximum value in the source sequence. + /// is null. public static ValueTask MaxAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2214,6 +2284,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2358,6 +2435,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2562,6 +2646,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2706,6 +2797,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -2910,6 +3008,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -3118,6 +3223,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -3386,6 +3498,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -3594,6 +3713,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -3862,6 +3988,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -4006,6 +4139,13 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } #endif + /// + /// Returns the minimum value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the minimum value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the minimum value in the source sequence. + /// is null. public static ValueTask MinAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt index 5b4247aacc..95deebfc0c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/MinMax.Generated.tt @@ -20,6 +20,7 @@ namespace System.Linq foreach (var m in new[] { "Max", "Min" }) { var comparison = m == "Max" ? ">" : "<"; + var extremum = m == "Max" ? "maximum" : "minimum"; foreach (var t in new[] { "int", "int?", "long", "long?", "float", "float?", "double", "double?", "decimal", "decimal?" }) { @@ -27,7 +28,18 @@ foreach (var m in new[] { "Max", "Min" }) var isInteger = t.StartsWith("int") || t.StartsWith("long"); var isNullable = t.EndsWith("?"); var shortCircuit = t.StartsWith("decimal"); + var typeStr = t; + if (isNullable) { + typeStr = "Nullable{" + t.Substring(0, 1).ToUpper() + t.Substring(1, t.Length - 2) + "}"; + } #> + /// + /// Returns the <#=extremum#> value in an async-enumerable sequence of values. + /// + /// A sequence of values to determine the <#=extremum#> value of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// A ValueTask containing a single element with the <#=extremum#> value in the source sequence. + /// is null. public static ValueTask<<#=t#>> <#=m#>Async(this IAsyncEnumerable<<#=t#>> source, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs index abae1e1d02..7a88b40593 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OfType.cs @@ -18,6 +18,13 @@ public static partial class AsyncEnumerable // what's done in Enumerable.OfType. Should we move this method to Ix, thus doing away with OfType // in the API surface altogether? + /// + /// Filters the elements of an async-enumerable sequence based on the specified type. + /// + /// The type to filter the elements in the source sequence on. + /// The async-enumerable sequence that contains the elements to be filtered. + /// An async-enumerable sequence that contains elements from the input sequence of type TResult. + /// is null. public static IAsyncEnumerable OfType(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs index 93650da980..38ec3e13d5 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/OrderBy.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Sorts the elements of a sequence in ascending order according to a key. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An async-enumerable sequence of values to order. + /// A function to extract a key from an element. + /// An ordered async-enumerable sequence whose elements are sorted according to a key. + /// or is null. public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: false, parent: null); @@ -21,6 +30,16 @@ public static partial class AsyncEnumerable new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: false, parent: null); #endif + /// + /// Sorts the elements of a sequence in ascending order by using a specified comparer. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An async-enumerable sequence of values to order. + /// A function to extract a key from an element. + /// A comparer to compare keys. + /// An ordered async-enumerable sequence whose elements are sorted according to a key. + /// or is null. public static IOrderedAsyncEnumerable OrderBy(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: false, parent: null); @@ -32,6 +51,15 @@ public static partial class AsyncEnumerable new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: false, parent: null); #endif + /// + /// Sorts the elements of a sequence in descending order according to a key. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An async-enumerable sequence of values to order. + /// A function to extract a key from an element. + /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. + /// or is null. public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector) => new OrderedAsyncEnumerable(source, keySelector, comparer: null, descending: true, parent: null); @@ -43,6 +71,16 @@ public static partial class AsyncEnumerable new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer: null, descending: true, parent: null); #endif + /// + /// Sorts the elements of a sequence in descending order by using a specified comparer. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An async-enumerable sequence of values to order. + /// A function to extract a key from an element. + /// A comparer to compare keys. + /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. + /// or is null. public static IOrderedAsyncEnumerable OrderByDescending(this IAsyncEnumerable source, Func keySelector, IComparer comparer) => new OrderedAsyncEnumerable(source, keySelector, comparer, descending: true, parent: null); @@ -54,6 +92,15 @@ public static partial class AsyncEnumerable new OrderedAsyncEnumerableWithTaskAndCancellation(source, keySelector, comparer, descending: true, parent: null); #endif + /// + /// Performs a subsequent ordering of the elements in a sequence in ascending order according to a key. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An ordered async-enumerable sequence that contains elements to sort. + /// A function to extract a key from each element. + /// An ordered async-enumerable whose elements are sorted according to a key. + /// or is null. public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func keySelector) { if (source == null) @@ -80,6 +127,16 @@ public static partial class AsyncEnumerable } #endif + /// + /// Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparer. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An ordered async-enumerable sequence that contains elements to sort. + /// A function to extract a key from each element. + /// A comparer to compare keys. + /// An ordered async-enumerable whose elements are sorted according to a key. + /// or is null. public static IOrderedAsyncEnumerable ThenBy(this IOrderedAsyncEnumerable source, Func keySelector, IComparer comparer) { if (source == null) @@ -106,6 +163,15 @@ public static partial class AsyncEnumerable } #endif + /// + /// Performs a subsequent ordering of the elements in a sequence in descending order, according to a key. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An ordered async-enumerable sequence that contains elements to sort. + /// A function to extract a key from each element. + /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. + /// or is null. public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func keySelector) { if (source == null) @@ -132,6 +198,16 @@ public static partial class AsyncEnumerable } #endif + /// + /// Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer. + /// + /// The type of the elements of source. + /// The type of the key returned by keySelector. + /// An ordered async-enumerable sequence that contains elements to sort. + /// A function to extract a key from each element. + /// A comparer to compare keys. + /// An ordered async-enumerable sequence whose elements are sorted in descending order according to a key. + /// or is null. public static IOrderedAsyncEnumerable ThenByDescending(this IOrderedAsyncEnumerable source, Func keySelector, IComparer comparer) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs index db40aac28d..4222c51e2d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Range.cs @@ -11,6 +11,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Generates an async-enumerable sequence of integral numbers within a specified range. + /// + /// The value of the first integer in the sequence. + /// The number of sequential integers to generate. + /// An async-enumerable sequence that contains a range of sequential integral numbers. + /// is less than zero. -or- + - 1 is larger than . public static IAsyncEnumerable Range(int start, int count) { if (count < 0) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs index 289c45a949..31817c28c6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Repeat.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Generates an async-enumerable sequence that repeats the given element the specified number of times. + /// + /// The type of the element that will be repeated in the produced sequence. + /// Element to repeat. + /// Number of times to repeat the element. + /// An async-enumerable sequence that repeats the given element the specified number of times. + /// is less than zero. public static IAsyncEnumerable Repeat(TResult element, int count) { if (count < 0) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs index ad101a1ee3..c27dc88e71 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Reverse.cs @@ -11,6 +11,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Inverts the order of the elements in a sequence. + /// + /// The type of the elements of source. + /// An async-enumerable sequence of values to reverse. + /// An async-enumerable sequence whose elements correspond to those of the input sequence in reverse order. + /// is null. public static IAsyncEnumerable Reverse(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs index 6070007721..c244260f59 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Select.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Projects each element of an async-enumerable sequence into a new form. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the result sequence, obtained by running the selector function for each element in the source sequence. + /// A sequence of elements to invoke a transform function on. + /// A transform function to apply to each source element. + /// An async-enumerable sequence whose elements are the result of invoking the transform function on each element of source. + /// or is null. public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func selector) { if (source == null) @@ -25,6 +34,15 @@ public static partial class AsyncEnumerable }; } + /// + /// Projects each element of an async-enumerable sequence into a new form by incorporating the element's index. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the result sequence, obtained by running the selector function for each element in the source sequence. + /// A sequence of elements to invoke a transform function on. + /// A transform function to apply to each source element; the second parameter of the function represents the index of the source element. + /// An async-enumerable sequence whose elements are the result of invoking the transform function on each element of source. + /// or is null. public static IAsyncEnumerable Select(this IAsyncEnumerable source, Func selector) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs index 821fd872f3..b6b513f723 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SelectMany.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Projects each element of an async-enumerable sequence to an async-enumerable sequence and merges the resulting async-enumerable sequences into one async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the projected inner sequences and the elements in the merged result sequence. + /// An async-enumerable sequence of elements to project. + /// A transform function to apply to each element. + /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. + /// or is null. public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func> selector) { if (source == null) @@ -44,6 +53,15 @@ public static partial class AsyncEnumerable } #endif + /// + /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by incorporating the element's index and merges the resulting async-enumerable sequences into one async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the projected inner sequences and the elements in the merged result sequence. + /// An async-enumerable sequence of elements to project. + /// A transform function to apply to each element; the second parameter of the function represents the index of the source element. + /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function on each element of the input sequence. + /// or is null. public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func> selector) { if (source == null) @@ -136,6 +154,17 @@ await foreach (var subElement in inner.WithCancellation(cancellationToken).Confi } #endif + /// + /// Projects each element of an async-enumerable sequence to an async-enumerable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the projected intermediate sequences. + /// The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements. + /// An async-enumerable sequence of elements to project. + /// A transform function to apply to each element. + /// A transform function to apply to each element of the intermediate sequence. + /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. + /// or or is null. public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func> collectionSelector, Func resultSelector) { if (source == null) @@ -213,6 +242,17 @@ await foreach (var subElement in inner.WithCancellation(cancellationToken).Confi } #endif + /// + /// Projects each element of an async-enumerable sequence to an async-enumerable sequence by incorporating the element's index, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The type of the elements in the projected intermediate sequences. + /// The type of the elements in the result sequence, obtained by using the selector to combine source sequence elements with their corresponding intermediate sequence elements. + /// An async-enumerable sequence of elements to project. + /// A transform function to apply to each element; the second parameter of the function represents the index of the source element. + /// A transform function to apply to each element of the intermediate sequence; the second parameter of the function represents the index of the source element and the fourth parameter represents the index of the intermediate element. + /// An async-enumerable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. + /// or or is null. public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, Func> collectionSelector, Func resultSelector) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs index dc19f78951..1c1d68a446 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SequenceEqual.cs @@ -10,9 +10,30 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Determines whether two sequences are equal by comparing the elements pairwise. + /// + /// The type of the elements in the source sequence. + /// First async-enumerable sequence to compare. + /// Second async-enumerable sequence to compare. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SequenceEqualAsync(this IAsyncEnumerable first, IAsyncEnumerable second, CancellationToken cancellationToken = default) => SequenceEqualAsync(first, second, comparer: null, cancellationToken); + /// + /// Determines whether two sequences are equal by comparing the elements pairwise using a specified equality comparer. + /// + /// The type of the elements in the source sequence. + /// First async-enumerable sequence to compare. + /// Second async-enumerable sequence to compare. + /// Comparer used to compare elements of both sequences. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence that contains a single element which indicates whether both sequences are of equal length and their corresponding elements are equal according to the specified equality comparer. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SequenceEqualAsync(this IAsyncEnumerable first, IAsyncEnumerable second, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (first == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs index db5fc5bfba..94bceac23c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Single.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the only element of an async-enumerable sequence, and reports an exception if there is not exactly one element in the async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the single element in the async-enumerable sequence. + /// is null. + /// (Asynchronous) The source sequence contains more than one element. -or- The source sequence is empty. public static ValueTask SingleAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -47,6 +56,16 @@ static async ValueTask Core(IAsyncEnumerable source, Cancellat } } + /// + /// Returns the only element of an async-enumerable sequence that satisfies the condition in the predicate, and reports an exception if there is not exactly one element in the async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// ValueTask containing the single element in the async-enumerable sequence that satisfies the condition in the predicate. + /// or is null. + /// (Asynchronous) No element satisfies the condition in the predicate. -or- More than one element satisfies the condition in the predicate. -or- The source sequence is empty. public static ValueTask SingleAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs index dc95815dd9..d15a11fdc0 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SingleOrDefault.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns the only element of an async-enumerable sequence, or a default value if the async-enumerable sequence is empty; this method reports an exception if there is more than one element in the async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// Sequence containing the single element in the async-enumerable sequence, or a default value if no such element exists. + /// is null. + /// (Asynchronous) The source sequence contains more than one element. public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -48,6 +57,16 @@ await using (var e = source.GetConfiguredAsyncEnumerator(cancellationToken, fals } } + /// + /// Returns the only element of an async-enumerable sequence that matches the predicate, or a default value if no such element exists; this method reports an exception if there is more than one element in the async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source async-enumerable sequence. + /// A predicate function to evaluate for elements in the source sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// Sequence containing the single element in the async-enumerable sequence that satisfies the condition in the predicate, or a default value if no such element exists. + /// or is null. + /// (Asynchronous) The sequence contains more than one element that satisfies the condition in the predicate. public static ValueTask SingleOrDefaultAsync(this IAsyncEnumerable source, Func predicate, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs index 03918dee05..ab09c11ad7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Skip.cs @@ -8,6 +8,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Bypasses a specified number of elements in an async-enumerable sequence and then returns the remaining elements. + /// + /// The type of the elements in the source sequence. + /// The sequence to take elements from. + /// The number of elements to skip before returning the remaining elements. + /// An async-enumerable sequence that contains the elements that occur after the specified index in the input sequence. + /// is null. + /// is less than zero. public static IAsyncEnumerable Skip(this IAsyncEnumerable source, int count) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs index 0b0d19a5c0..4bff35a1a5 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipLast.cs @@ -11,6 +11,19 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Bypasses a specified number of elements at the end of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source sequence. + /// Number of elements to bypass at the end of the source sequence. + /// An async-enumerable sequence containing the source sequence elements except for the bypassed ones at the end. + /// is null. + /// is less than zero. + /// + /// This operator accumulates a queue with a length enough to store the first elements. As more elements are + /// received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. + /// public static IAsyncEnumerable SkipLast(this IAsyncEnumerable source, int count) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs index fbca5a7f67..17dadf7a78 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/SkipWhile.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Bypasses elements in an async-enumerable sequence as long as a specified condition is true and then returns the remaining elements. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to return elements from. + /// A function to test each element for a condition. + /// An async-enumerable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + /// or is null. public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func predicate) { if (source == null) @@ -42,6 +50,15 @@ async IAsyncEnumerator Core(CancellationToken cancellationToken) } } + /// + /// Bypasses elements in an async-enumerable sequence as long as a specified condition is true and then returns the remaining elements. + /// The element's index is used in the logic of the predicate function. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to return elements from. + /// A function to test each element for a condition; the second parameter of the function represents the index of the source element. + /// An async-enumerable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. + /// or is null. public static IAsyncEnumerable SkipWhile(this IAsyncEnumerable source, Func predicate) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs index 54091ca92c..624f22165d 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -33,6 +41,16 @@ await foreach (int value in source.WithCancellation(cancellationToken).Configure } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -116,6 +134,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -139,6 +165,16 @@ await foreach (long value in source.WithCancellation(cancellationToken).Configur } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -222,6 +258,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -242,6 +286,16 @@ await foreach (float value in source.WithCancellation(cancellationToken).Configu } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -316,6 +370,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -336,6 +398,16 @@ await foreach (double value in source.WithCancellation(cancellationToken).Config } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -410,6 +482,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -430,6 +510,16 @@ await foreach (decimal value in source.WithCancellation(cancellationToken).Confi } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -504,6 +594,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -527,6 +625,16 @@ await foreach (int? value in source.WithCancellation(cancellationToken).Configur } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -610,6 +718,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -633,6 +749,16 @@ await foreach (long? value in source.WithCancellation(cancellationToken).Configu } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -716,6 +842,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -736,6 +870,16 @@ await foreach (float? value in source.WithCancellation(cancellationToken).Config } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -810,6 +954,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -830,6 +982,16 @@ await foreach (double? value in source.WithCancellation(cancellationToken).Confi } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) @@ -904,6 +1066,14 @@ await foreach (TSource item in source.WithCancellation(cancellationToken).Config } #endif + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) @@ -924,6 +1094,16 @@ await foreach (decimal? value in source.WithCancellation(cancellationToken).Conf } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask SumAsync(this IAsyncEnumerable source, Func selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt index 6a2994ef34..cd2a6f3b46 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Sum.Generated.tt @@ -34,7 +34,20 @@ var os = new[] foreach (var o in os) { var n = o.type.EndsWith("?") ? ".GetValueOrDefault()" : ""; + + var typeStr = o.type; + if (o.type.EndsWith("?")) { + typeStr = "Nullable{" + o.type.Substring(0, 1).ToUpper() + o.type.Substring(1, o.type.Length - 2) + "}"; + } #> + /// + /// Computes the sum of a sequence of values. + /// + /// A sequence of values to calculate the sum of. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask<<#=o.type#>> SumAsync(this IAsyncEnumerable<<#=o.type#>> source, CancellationToken cancellationToken = default) { if (source == null) @@ -71,6 +84,16 @@ else } } + /// + /// Computes the sum of a sequence of values that are obtained by invoking a transform function on each element of the input sequence. + /// + /// The type of the elements in the source sequence. + /// A sequence of values that are used to calculate a sum. + /// A transform function to apply to each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with the sum of the values in the source sequence. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask<<#=o.type#>> SumAsync(this IAsyncEnumerable source, Func> selector, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs index c4335d5afd..3aedac7197 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Take.cs @@ -8,6 +8,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns a specified number of contiguous elements from the start of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The sequence to take elements from. + /// The number of elements to return. + /// An async-enumerable sequence that contains the specified number of elements from the start of the input sequence. + /// is null. + /// is less than zero. public static IAsyncEnumerable Take(this IAsyncEnumerable source, int count) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs index 28538f0e84..af47c69bf6 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeLast.cs @@ -11,6 +11,19 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns a specified number of contiguous elements from the end of an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Source sequence. + /// Number of elements to take from the end of the source sequence. + /// An async-enumerable sequence containing the specified number of elements from the end of the source sequence. + /// is null. + /// is less than zero. + /// + /// This operator accumulates a buffer with a length enough to store elements elements. Upon completion of + /// the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. + /// public static IAsyncEnumerable TakeLast(this IAsyncEnumerable source, int count) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs index 56c1161034..8e7e397423 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/TakeWhile.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Returns elements from an async-enumerable sequence as long as a specified condition is true. + /// + /// The type of the elements in the source sequence. + /// A sequence to return elements from. + /// A function to test each element for a condition. + /// An async-enumerable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. + /// or is null. public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func predicate) { if (source == null) @@ -33,6 +41,15 @@ await foreach (var element in source.WithCancellation(cancellationToken).Configu } } + /// + /// Returns elements from an async-enumerable sequence as long as a specified condition is true. + /// The element's index is used in the logic of the predicate function. + /// + /// The type of the elements in the source sequence. + /// A sequence to return elements from. + /// A function to test each element for a condition; the second parameter of the function represents the index of the source element. + /// An async-enumerable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. + /// or is null. public static IAsyncEnumerable TakeWhile(this IAsyncEnumerable source, Func predicate) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs index bad8fdab7e..a7b9bee8ee 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToArray.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Creates an array from an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The source async-enumerable sequence to get an array of elements for. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with an array containing all the elements of the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask ToArrayAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs index 996e3f0c95..ae7f688b0a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Observable.cs @@ -11,6 +11,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Converts an observable sequence to an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Observable sequence to convert to an async-enumerable sequence. + /// The async-enumerable sequence whose elements are pulled from the given observable sequence. + /// is null. public static IAsyncEnumerable ToAsyncEnumerable(this IObservable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs index 244d06efe3..dee444b11b 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.Task.cs @@ -9,6 +9,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Converts a task to an async-enumerable sequence. + /// + /// The type of the elements in the source task. + /// Task to convert to an async-enumerable sequence. + /// The async-enumerable sequence whose element is pulled from the given task. + /// is null. public static IAsyncEnumerable ToAsyncEnumerable(this Task task) { if (task == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs index 4f76b827ad..be20ba6407 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToAsyncEnumerable.cs @@ -11,6 +11,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Converts an enumerable sequence to an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// Enumerable sequence to convert to an async-enumerable sequence. + /// The async-enumerable sequence whose elements are pulled from the given enumerable sequence. + /// is null. public static IAsyncEnumerable ToAsyncEnumerable(this IEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs index e096e3ae12..439841b7d0 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToDictionary.cs @@ -10,9 +10,32 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the dictionary key computed for each element in the source sequence. + /// An async-enumerable sequence to create a dictionary for. + /// A function to extract a key from each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a dictionary mapping unique key values onto the corresponding source sequence's element. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func keySelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAsync(source, keySelector, comparer: null, cancellationToken); + /// + /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function, and a comparer. + /// + /// The type of the elements in the source sequence. + /// The type of the dictionary key computed for each element in the source sequence. + /// An async-enumerable sequence to create a dictionary for. + /// A function to extract a key from each element. + /// An equality comparer to compare keys. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a dictionary mapping unique key values onto the corresponding source sequence's element. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) @@ -93,9 +116,36 @@ await foreach (var item in source.WithCancellation(cancellationToken).ConfigureA } #endif + /// + /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function, and an element selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the dictionary key computed for each element in the source sequence. + /// The type of the dictionary value computed for each element in the source sequence. + /// An async-enumerable sequence to create a dictionary for. + /// A function to extract a key from each element. + /// A transform function to produce a result element value from each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a dictionary mapping unique key values onto the corresponding source sequence's element. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func keySelector, Func elementSelector, CancellationToken cancellationToken = default) where TKey : notnull => ToDictionaryAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + /// + /// Creates a dictionary from an async-enumerable sequence according to a specified key selector function, a comparer, and an element selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the dictionary key computed for each element in the source sequence. + /// The type of the dictionary value computed for each element in the source sequence. + /// An async-enumerable sequence to create a dictionary for. + /// A function to extract a key from each element. + /// A transform function to produce a result element value from each element. + /// An equality comparer to compare keys. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a dictionary mapping unique key values onto the corresponding source sequence's element. + /// or or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToDictionaryAsync(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) where TKey : notnull { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs index a3ad45a990..d12383f2c9 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToEnumerable.cs @@ -12,6 +12,13 @@ public static partial class AsyncEnumerable // REVIEW: This type of blocking is an anti-pattern. We may want to move it to System.Interactive.Async // and remove it from System.Linq.Async API surface. + /// + /// Converts an async-enumerable sequence to an enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence to convert to an enumerable sequence. + /// The enumerable sequence containing the elements in the async-enumerable sequence. + /// is null. public static IEnumerable ToEnumerable(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs index a1f8ab7d42..b1464acae7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToHashSet.cs @@ -10,9 +10,28 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Creates a hash set from an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The source async-enumerable sequence to get a hash set of elements for. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a hash set containing all the elements of the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToHashSetAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) => ToHashSetAsync(source, comparer: null, cancellationToken); + /// + /// Creates a hash set from an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The source async-enumerable sequence to get a hash set of elements for. + /// An equality comparer to compare elements of the sequence. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a hash set containing all the elements of the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToHashSetAsync(this IAsyncEnumerable source, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs index e7420f4332..5dac91477a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToList.cs @@ -10,6 +10,15 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Creates a list from an async-enumerable sequence. + /// + /// The type of the elements in the source sequence. + /// The source async-enumerable sequence to get a list of elements for. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a list containing all the elements of the source sequence. + /// is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToListAsync(this IAsyncEnumerable source, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs index f2cafa0845..c05ce11f4e 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToLookup.cs @@ -10,9 +10,32 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Creates a lookup from an async-enumerable sequence according to a specified key selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the lookup key computed for each element in the source sequence. + /// An async-enumerable sequence to create a lookup for. + /// A function to extract a key from each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a lookup mapping unique key values onto the corresponding source sequence's elements. + /// or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func keySelector, CancellationToken cancellationToken = default) => ToLookupAsync(source, keySelector, comparer: null, cancellationToken); + /// + /// Creates a lookup from an async-enumerable sequence according to a specified key selector function, and a comparer. + /// + /// The type of the elements in the source sequence. + /// The type of the lookup key computed for each element in the source sequence. + /// An async-enumerable sequence to create a lookup for. + /// A function to extract a key from each element. + /// An equality comparer to compare keys. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a lookup mapping unique key values onto the corresponding source sequence's elements. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func keySelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) @@ -66,9 +89,36 @@ public static partial class AsyncEnumerable } #endif + /// + /// Creates a lookup from an async-enumerable sequence according to a specified key selector function, and an element selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the lookup key computed for each element in the source sequence. + /// The type of the lookup value computed for each element in the source sequence. + /// An async-enumerable sequence to create a lookup for. + /// A function to extract a key from each element. + /// A transform function to produce a result element value from each element. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a lookup mapping unique key values onto the corresponding source sequence's elements. + /// or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func keySelector, Func elementSelector, CancellationToken cancellationToken = default) => ToLookupAsync(source, keySelector, elementSelector, comparer: null, cancellationToken); + /// + /// Creates a lookup from an async-enumerable sequence according to a specified key selector function, a comparer, and an element selector function. + /// + /// The type of the elements in the source sequence. + /// The type of the lookup key computed for each element in the source sequence. + /// The type of the lookup value computed for each element in the source sequence. + /// An async-enumerable sequence to create a lookup for. + /// A function to extract a key from each element. + /// A transform function to produce a result element value from each element. + /// An equality comparer to compare keys. + /// The optional cancellation token to be used for cancelling the sequence at any time. + /// An async-enumerable sequence containing a single element with a lookup mapping unique key values onto the corresponding source sequence's elements. + /// or or or is null. + /// The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior. public static ValueTask> ToLookupAsync(this IAsyncEnumerable source, Func keySelector, Func elementSelector, IEqualityComparer? comparer, CancellationToken cancellationToken = default) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs index 9ea713e281..2880fdacf7 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/ToObservable.cs @@ -8,6 +8,13 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Converts an async-enumerable sequence to an observable sequence. + /// + /// The type of the elements in the source sequence. + /// Enumerable sequence to convert to an observable sequence. + /// The observable sequence whose elements are pulled from the given enumerable sequence. + /// is null. public static IObservable ToObservable(this IAsyncEnumerable source) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs index d8cc53cabf..b52de54b7c 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Union.cs @@ -11,9 +11,26 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Produces the set union of two sequences by using the default equality comparer. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose distinct elements form the first set for the union. + /// An async-enumerable sequence whose distinct elements form the second set for the union. + /// An async-enumerable sequence that contains the elements from both input sequences, excluding duplicates. + /// or is null. public static IAsyncEnumerable Union(this IAsyncEnumerable first, IAsyncEnumerable second) => Union(first, second, comparer: null); + /// + /// Produces the set union of two sequences by using a specified equality comparer. + /// + /// The type of the elements of the input sequences. + /// An async-enumerable sequence whose distinct elements form the first set for the union. + /// An async-enumerable sequence whose distinct elements form the second set for the union. + /// The equality comparer to compare values. + /// An async-enumerable sequence that contains the elements from both input sequences, excluding duplicates. + /// or is null. public static IAsyncEnumerable Union(this IAsyncEnumerable first, IAsyncEnumerable second, IEqualityComparer? comparer) { if (first == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs index 4bbd158906..8f54b0186a 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Where.cs @@ -10,6 +10,14 @@ namespace System.Linq { public static partial class AsyncEnumerable { + /// + /// Filters the elements of an async-enumerable sequence based on a predicate. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose elements to filter. + /// A function to test each source element for a condition. + /// An async-enumerable sequence that contains elements from the input sequence that satisfy the condition. + /// or is null. public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func predicate) { if (source == null) @@ -26,6 +34,14 @@ public static IAsyncEnumerable Where(this IAsyncEnumerable(source, predicate); } + /// + /// Filters the elements of an async-enumerable sequence based on a predicate by incorporating the element's index. + /// + /// The type of the elements in the source sequence. + /// An async-enumerable sequence whose elements to filter. + /// A function to test each source element for a condition; the second parameter of the function represents the index of the source element. + /// An async-enumerable sequence that contains elements from the input sequence that satisfy the condition. + /// or is null. public static IAsyncEnumerable Where(this IAsyncEnumerable source, Func predicate) { if (source == null) diff --git a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs index f75d49b48c..08c0e50ced 100644 --- a/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs +++ b/Ix.NET/Source/System.Linq.Async/System/Linq/Operators/Zip.cs @@ -33,6 +33,17 @@ async IAsyncEnumerator<(TFirst, TSecond)> Core(CancellationToken cancellationTok } #endif + /// + /// Merges two async-enumerable sequences into one async-enumerable sequence by combining their elements in a pairwise fashion. + /// + /// The type of the elements in the first source sequence. + /// The type of the elements in the second source sequence. + /// The type of the elements in the result sequence, returned by the selector function. + /// First async-enumerable source. + /// Second async-enumerable source. + /// Function to invoke for each consecutive pair of elements from the first and second source. + /// An async-enumerable sequence containing the result of pairwise combining the elements of the first and second source using the specified result selector function. + /// or or is null. public static IAsyncEnumerable Zip(this IAsyncEnumerable first, IAsyncEnumerable second, Func selector) { if (first == null) From 2c402143531d310d57ce55b2aaf6b9ea12bfcd65 Mon Sep 17 00:00:00 2001 From: Oren Novotny Date: Thu, 28 Nov 2019 13:32:35 -0500 Subject: [PATCH 2/2] Remove IDE guid --- Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj index 5cb58c8b40..18ace335cf 100644 --- a/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj +++ b/Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj @@ -87,8 +87,4 @@ - - - -