Skip to content

Conversation

@idg10
Copy link
Collaborator

@idg10 idg10 commented Nov 13, 2025

System.Linq.Async always offered versions of the AverageAsync operator that accepted projection selectors. These came in three forms:

  1. Func<TSource, TResult>-style selectors
  2. Async selectors of form Func<TSource, ValueTask<TResult>>
  3. Cancellable selectors of the form Func<TSource, CancellationToken, ValueTask<TResult>>

System.Linq.Async is being deprecated because the .NET class libraries now include most of the IAsyncEnumerable<T> LINQ functionality in System.Linq.AsyncEnumerable. However, certain features are missing in that, include projection-based averaging.

In cases where System.Linq.AsyncEnumerable does not offer equivalent functionality, we're moving features out of System.Linq.Async and into System.Interactive.Async.

However, we missed 2 and 3 here. That happened because those overload have different names: AverageAwaitAsync, and AverageAwaitWithCancellationAsync.) Those naming conventions are out of line with .NET guidelines, so as part of this migration we've been deprecating anything using those old conventions. In many cases, .NET's System.Linq.AsyncEnumerable, adds new methods with the same functionality but with proper naming conventions. In cases where .NET has not replicated our functionality, we have followed suit by deprecating these methods and then defining properly-named overloads in System.Interactive.Async.

Except that in this case we only did the deprecation part: we forgot to add the equivalent properly named overloads in System.Interactive.Async. This fixes that.

@idg10 idg10 added this to the Ix 7.0 milestone Nov 13, 2025
@idg10 idg10 self-assigned this Nov 13, 2025
@idg10 idg10 marked this pull request as ready for review November 13, 2025 10:36
@idg10 idg10 merged commit 45ca03f into main Nov 13, 2025
6 checks passed
@idg10 idg10 deleted the feature/asyncenumerable-net10-missing-averages branch November 13, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants