Skip to content

MultipleTasksDemo: move to .NET 11, add Task.WhenAll list and Task.WhenEach examples - #2402

Merged
vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/72178-csharp-execute-multiple-tasks-asynchronously
Nov 19, 2026
Merged

vladimir-pecanac-main merged 3 commits into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/72178-csharp-execute-multiple-tasks-asynchronously

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Moves the MultipleTasksDemo sample (API, client, benchmarks and tests) from .NET 6 to .NET 11. The API drops Swashbuckle for Microsoft.AspNetCore.OpenApi as the current webapi template does, the benchmarks move to BenchmarkDotNet 0.15.8 in process, and the tests move to NUnit 5 and Moq 4.21.0. The TaskExtensions catch block now prints its message, the client picks a demo from its first argument, and the executor gains the plain Task.WhenAll version, a Task.WhenAll over a list of ids and a Task.WhenEach version, each with a test. The two parallel loop tests now call the methods they are named after.

…enEach examples

Retarget all four projects to net11.0. Replace Swashbuckle with
Microsoft.AspNetCore.OpenApi, update BenchmarkDotNet to 0.15.8 with
[InProcess], NUnit 5, Moq 4.21.0 and the test SDK. Fix the TaskExtensions
console line, pick the client demo from the first argument, add
ExecuteInParallelUsingTaskWhenAll, ExecuteUsingTaskWhenAll and
ExecuteUsingTaskWhenEach with tests, and point the two parallel loop tests
at the methods they name.
@vladimir-pecanac-main
vladimir-pecanac-main merged commit ae342e7 into CodeMazeBlog:main Nov 19, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant