From 9d3bddfde9875a2f87b2398385b15fe5ea485d65 Mon Sep 17 00:00:00 2001 From: Bartosz Klonowski <70535775+BartoszKlonowski@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:10:14 +0200 Subject: [PATCH 1/5] Adjust the samples code so that it matches the refactored tutorial (#7067) * Adjust the samples code so that it matches the refactored tutorial * Use .NET v9 instead of v8 --- .../console-webapiclient/Program.cs | 9 +++------ .../console-webapiclient/Repository.cs | 18 ++++++++---------- .../console-webapiclient/webapiclient.csproj | 2 +- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/csharp/getting-started/console-webapiclient/Program.cs b/csharp/getting-started/console-webapiclient/Program.cs index 141266bb4e3..eee777bdc50 100644 --- a/csharp/getting-started/console-webapiclient/Program.cs +++ b/csharp/getting-started/console-webapiclient/Program.cs @@ -1,5 +1,5 @@ using System.Net.Http.Headers; -using System.Text.Json; +using System.Net.Http.Json; using HttpClient client = new(); client.DefaultRequestHeaders.Accept.Clear(); @@ -22,9 +22,6 @@ static async Task> ProcessRepositoriesAsync(HttpClient client) { - await using Stream stream = - await client.GetStreamAsync("https://api.github.com/orgs/dotnet/repos"); - var repositories = - await JsonSerializer.DeserializeAsync>(stream); - return repositories ?? new(); + var repositories = await client.GetFromJsonAsync>("https://api.github.com/orgs/dotnet/repos"); + return repositories ?? new List(); } diff --git a/csharp/getting-started/console-webapiclient/Repository.cs b/csharp/getting-started/console-webapiclient/Repository.cs index b43527db56f..cd2d4e559dc 100644 --- a/csharp/getting-started/console-webapiclient/Repository.cs +++ b/csharp/getting-started/console-webapiclient/Repository.cs @@ -1,13 +1,11 @@ -using System; -using System.Text.Json.Serialization; - -public sealed record class Repository( - [property: JsonPropertyName("name")] string Name, - [property: JsonPropertyName("description")] string Description, - [property: JsonPropertyName("html_url")] Uri GitHubHomeUrl, - [property: JsonPropertyName("homepage")] Uri Homepage, - [property: JsonPropertyName("watchers")] int Watchers, - [property: JsonPropertyName("pushed_at")] DateTime LastPushUtc) +public record class Repository( + string Name, + string Description, + Uri GitHubHomeUrl, + Uri Homepage, + int Watchers, + DateTime LastPushUtc +) { public DateTime LastPush => LastPushUtc.ToLocalTime(); } diff --git a/csharp/getting-started/console-webapiclient/webapiclient.csproj b/csharp/getting-started/console-webapiclient/webapiclient.csproj index cba1ce1334c..93d988e5f1a 100644 --- a/csharp/getting-started/console-webapiclient/webapiclient.csproj +++ b/csharp/getting-started/console-webapiclient/webapiclient.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net9.0 enable enable From a05955ecb64aeb3cfcd4bd19314793fc979a8048 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:03:25 +0000 Subject: [PATCH 2/5] Bump actions/setup-node from 4.4.0 to 5.0.0 in the dotnet group Bumps the dotnet group with 1 update: [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/setup-node` from 4.4.0 to 5.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/49933ea5288caeca8642d1e84afbd3f7d6820020...a0853c24544627f65ddf259abe73b1d18a591444) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: dotnet ... Signed-off-by: dependabot[bot] --- .github/workflows/markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 74279c2dceb..e9ddc45f9a2 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 #@v2 - name: Use Node.js - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #@v1 + uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #@v1 with: node-version: 12.x - name: Run Markdownlint From b6f83e2478c6c47244eb0980027c4538f1ee2685 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 20:03:25 +0000 Subject: [PATCH 3/5] Bump actions/setup-node from 5.0.0 to 6.0.0 in the dotnet group Bumps the dotnet group with 1 update: [actions/setup-node](https://github.com/actions/setup-node). Updates `actions/setup-node` from 5.0.0 to 6.0.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/a0853c24544627f65ddf259abe73b1d18a591444...2028fbc5c25fe9cf00d9f06a71cc4710d4507903) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: dotnet ... Signed-off-by: dependabot[bot] --- .github/workflows/markdownlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index e9ddc45f9a2..b4230869ac8 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 #@v2 - name: Use Node.js - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #@v1 + uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 #@v1 with: node-version: 12.x - name: Run Markdownlint From 76fbe92d691b4dde519d53b0659b842beef690cb Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Mon, 27 Oct 2025 18:23:07 -0300 Subject: [PATCH 4/5] Adjust sample code to match fixed tutorial (#7073) --- csharp/getting-started/console-webapiclient/Repository.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/csharp/getting-started/console-webapiclient/Repository.cs b/csharp/getting-started/console-webapiclient/Repository.cs index cd2d4e559dc..2dee1646717 100644 --- a/csharp/getting-started/console-webapiclient/Repository.cs +++ b/csharp/getting-started/console-webapiclient/Repository.cs @@ -1,10 +1,12 @@ -public record class Repository( +using System.Text.Json.Serialization; + +public record class Repository( string Name, string Description, - Uri GitHubHomeUrl, + [property: JsonPropertyName("html_url")] Uri GitHubHomeUrl, Uri Homepage, int Watchers, - DateTime LastPushUtc + [property: JsonPropertyName("pushed_at")] DateTime LastPushUtc ) { public DateTime LastPush => LastPushUtc.ToLocalTime(); From 68a278582dc0f89bed59b85c64191d95e5657ffc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:52:35 +0000 Subject: [PATCH 5/5] Bump actions/upload-artifact from 4.6.2 to 5.0.0 in the dotnet group (#7074) Bumps the dotnet group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact). Updates `actions/upload-artifact` from 4.6.2 to 5.0.0 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...330a01c490aca151604b8cf639adc76d48f6c5d4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 5.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: dotnet ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/snippets5000.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/snippets5000.yml b/.github/workflows/snippets5000.yml index a9108afae7e..be9f896175a 100644 --- a/.github/workflows/snippets5000.yml +++ b/.github/workflows/snippets5000.yml @@ -62,7 +62,7 @@ jobs: # Update build output json file - name: Upload build results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #@v4.6.2 + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 #@v5.0.0 with: name: build path: ./output.json