From 8d419306f2939ab9d897c8bc943dfd3070cd43ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 25 Jul 2025 22:25:17 +0000 Subject: [PATCH 1/2] Initial plan From 1e3ef083e247f44d20070282810083112c858275 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 25 Jul 2025 22:31:40 +0000 Subject: [PATCH 2/2] Fix async method naming: rename GetDotNetCount to GetDotNetCountAsync Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- .../snippets/async-scenarios/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/csharp/asynchronous-programming/snippets/async-scenarios/Program.cs b/docs/csharp/asynchronous-programming/snippets/async-scenarios/Program.cs index b386d1ddad6a9..fc847ba26edbc 100644 --- a/docs/csharp/asynchronous-programming/snippets/async-scenarios/Program.cs +++ b/docs/csharp/asynchronous-programming/snippets/async-scenarios/Program.cs @@ -147,9 +147,9 @@ private static async Task GetUsersAsyncByLINQ(IEnumerable userIds) // [HttpGet, Route("DotNetCount")] - static public async Task GetDotNetCount(string URL) + static public async Task GetDotNetCountAsync(string URL) { - // Suspends GetDotNetCount() to allow the caller (the web server) + // Suspends GetDotNetCountAsync() to allow the caller (the web server) // to accept another request, rather than blocking on this one. var html = await s_httpClient.GetStringAsync(URL); return Regex.Matches(html, @"\.NET").Count; @@ -164,7 +164,7 @@ static async Task Main() int total = 0; foreach (string url in s_urlList) { - var result = await GetDotNetCount(url); + var result = await GetDotNetCountAsync(url); Console.WriteLine($"{url}: {result}"); total += result; }