diff --git a/.github/workflows/pipelines.yml b/.github/workflows/pipelines.yml index 2ab791ae6..8f37efcf3 100644 --- a/.github/workflows/pipelines.yml +++ b/.github/workflows/pipelines.yml @@ -28,12 +28,12 @@ jobs: with: use-restore-cache: true - prepare_windows: - name: 🪟 Prepare Windows - uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 - with: - use-restore-cache: true - runs-on: windows-2022 + # prepare_windows: + # name: 🪟 Prepare Windows + # uses: codebeltnet/jobs-dotnet-restore/.github/workflows/default.yml@v1 + # with: + # use-restore-cache: true + # runs-on: windows-2022 prepare_test: name: 📜 Prepare Test @@ -83,22 +83,37 @@ jobs: version: ${{ needs.build.outputs.version }} restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} - test: + test_linux: name: call-test - needs: [build, prepare_test, prepare_linux, prepare_windows] + needs: [build, prepare_test, prepare_linux] strategy: fail-fast: false matrix: - os: [ubuntu-24.04, windows-2022] configuration: [Debug, Release] project: ${{ fromJson(needs.prepare_test.outputs.json) }} uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2 with: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-24.04 + configuration: ${{ matrix.configuration }} + projects: ${{ matrix.project }} + restore-cache-key: ${{ needs.prepare_linux.outputs.restore-cache-key }} + + test_windows: + name: call-test + needs: [build, prepare_test] + strategy: + fail-fast: false + matrix: + configuration: [Debug, Release] + project: ${{ fromJson(needs.prepare_test.outputs.json) }} + uses: codebeltnet/jobs-dotnet-test/.github/workflows/default.yml@v2 + with: + runs-on: windows-2022 configuration: ${{ matrix.configuration }} projects: ${{ matrix.project }} - restore-cache-key: ${{ matrix.os == 'ubuntu-24.04' && needs.prepare_linux.outputs.restore-cache-key || needs.prepare_windows.outputs.restore-cache-key }} test-arguments: -- RunConfiguration.DisableAppDomain=true + build: true # we need to build for .net48 + restore: true # apparently we need to restore for .net48 integration_test: name: ⚗️ Integration Test @@ -162,7 +177,7 @@ jobs: sonarcloud: name: call-sonarcloud - needs: [build,test,integration_test] + needs: [build, test_linux, test_windows, integration_test] uses: codebeltnet/jobs-sonarcloud/.github/workflows/default.yml@v1 with: organization: geekle @@ -173,7 +188,7 @@ jobs: codecov: name: call-codecov - needs: [build,test,integration_test] + needs: [build, test_linux, test_windows, integration_test] uses: codebeltnet/jobs-codecov/.github/workflows/default.yml@v1 with: repository: gimlichael/Cuemon @@ -182,7 +197,7 @@ jobs: codeql: name: call-codeql - needs: [build,test,integration_test] + needs: [build, test_linux, test_windows, integration_test] uses: codebeltnet/jobs-codeql/.github/workflows/default.yml@v1 permissions: security-events: write @@ -190,7 +205,7 @@ jobs: deploy: if: github.event_name != 'pull_request' name: call-nuget - needs: [build, pack, test, integration_test, sonarcloud, codecov, codeql] + needs: [build, pack, test_linux, test_windows, integration_test, sonarcloud, codecov, codeql] uses: codebeltnet/jobs-nuget-push/.github/workflows/default.yml@v1 with: version: ${{ needs.build.outputs.version }} diff --git a/.nuget/Cuemon.AspNetCore.App/PackageReleaseNotes.txt b/.nuget/Cuemon.AspNetCore.App/PackageReleaseNotes.txt index bca3580be..e1ad2362e 100644 --- a/.nuget/Cuemon.AspNetCore.App/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.AspNetCore.App/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.AspNetCore.Authentication/PackageReleaseNotes.txt b/.nuget/Cuemon.AspNetCore.Authentication/PackageReleaseNotes.txt index 6b5dfa307..eaada0588 100644 --- a/.nuget/Cuemon.AspNetCore.Authentication/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.AspNetCore.Authentication/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.AspNetCore.Mvc/PackageReleaseNotes.txt b/.nuget/Cuemon.AspNetCore.Mvc/PackageReleaseNotes.txt index f43e51703..c35dfba83 100644 --- a/.nuget/Cuemon.AspNetCore.Mvc/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.AspNetCore.Mvc/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.AspNetCore.Razor.TagHelpers/PackageReleaseNotes.txt b/.nuget/Cuemon.AspNetCore.Razor.TagHelpers/PackageReleaseNotes.txt index 6c35f2879..a6ad8212b 100644 --- a/.nuget/Cuemon.AspNetCore.Razor.TagHelpers/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.AspNetCore.Razor.TagHelpers/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.AspNetCore/PackageReleaseNotes.txt b/.nuget/Cuemon.AspNetCore/PackageReleaseNotes.txt index ef3e6454e..20e66248c 100644 --- a/.nuget/Cuemon.AspNetCore/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.AspNetCore/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Core.App/PackageReleaseNotes.txt b/.nuget/Cuemon.Core.App/PackageReleaseNotes.txt index 1f4e1a283..88fb051e3 100644 --- a/.nuget/Cuemon.Core.App/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Core.App/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Core/PackageReleaseNotes.txt b/.nuget/Cuemon.Core/PackageReleaseNotes.txt index eac5051f8..b93dc9e80 100644 --- a/.nuget/Cuemon.Core/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Core/PackageReleaseNotes.txt @@ -1,4 +1,14 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +# New Features +- ADDED Awaiter class in the Cuemon.Threading namespace that provides a set of static methods for awaiting asynchronous operations +- ADDED AsyncRunOptions class in the Cuemon.Threading namespace that provides configuration options for the Awaiter.RunUntilSuccessfulOrTimeoutAsync method +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Data.Integrity/PackageReleaseNotes.txt b/.nuget/Cuemon.Data.Integrity/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Data.Integrity/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Data.Integrity/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Data.SqlClient/PackageReleaseNotes.txt b/.nuget/Cuemon.Data.SqlClient/PackageReleaseNotes.txt index 9983a86c3..c633694ba 100644 --- a/.nuget/Cuemon.Data.SqlClient/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Data.SqlClient/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Data/PackageReleaseNotes.txt b/.nuget/Cuemon.Data/PackageReleaseNotes.txt index 7bc66ecb0..bd121f8d8 100644 --- a/.nuget/Cuemon.Data/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Data/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Diagnostics/PackageReleaseNotes.txt b/.nuget/Cuemon.Diagnostics/PackageReleaseNotes.txt index fd9a488f2..a7febfb58 100644 --- a/.nuget/Cuemon.Diagnostics/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Diagnostics/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Authentication/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Authentication/PackageReleaseNotes.txt index 655d71e5a..6f5fa2d55 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Authentication/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Authentication/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/PackageReleaseNotes.txt index 418011071..e1bfde256 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Text.Json/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/PackageReleaseNotes.txt index 26ffc711f..8353fe33b 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.Formatters.Xml/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/PackageReleaseNotes.txt index d7c2cf1e1..10af5c271 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Mvc.RazorPages/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Mvc/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Mvc/PackageReleaseNotes.txt index 92572058d..908357d5f 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Mvc/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Mvc/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Text.Json/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Text.Json/PackageReleaseNotes.txt index a5ec79d63..b373b06b3 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Text.Json/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Text.Json/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore.Xml/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore.Xml/PackageReleaseNotes.txt index 643c8a17d..cea6f06c0 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore.Xml/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore.Xml/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.AspNetCore/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.AspNetCore/PackageReleaseNotes.txt index 05d8d31c8..f3f5ca1dd 100644 --- a/.nuget/Cuemon.Extensions.AspNetCore/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.AspNetCore/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9 and .NET 8 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9 and .NET 8   # ALM diff --git a/.nuget/Cuemon.Extensions.Collections.Generic/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Collections.Generic/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Collections.Generic/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Collections.Generic/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Collections.Specialized/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Collections.Specialized/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Collections.Specialized/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Collections.Specialized/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt index 42c21b255..5961b6ee4 100644 --- a/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Core/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Data.Integrity/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Data.Integrity/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Data.Integrity/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Data.Integrity/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Data/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Data/PackageReleaseNotes.txt index 514daa01e..55a5f4a0c 100644 --- a/.nuget/Cuemon.Extensions.Data/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Data/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.DependencyInjection/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.DependencyInjection/PackageReleaseNotes.txt index 9aefcd2fe..7d0abf069 100644 --- a/.nuget/Cuemon.Extensions.DependencyInjection/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.DependencyInjection/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Diagnostics/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Diagnostics/PackageReleaseNotes.txt index 81ae84502..1d69c3ee2 100644 --- a/.nuget/Cuemon.Extensions.Diagnostics/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Diagnostics/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Hosting/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Hosting/PackageReleaseNotes.txt index 1030884cf..67ea82999 100644 --- a/.nuget/Cuemon.Extensions.Hosting/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Hosting/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.IO/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.IO/PackageReleaseNotes.txt index 02c4b26a4..9ccd2c54e 100644 --- a/.nuget/Cuemon.Extensions.IO/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.IO/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8, .NET Standard 2.1 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8, .NET Standard 2.1 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Net/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Net/PackageReleaseNotes.txt index 27fdc8ba1..7a5343f75 100644 --- a/.nuget/Cuemon.Extensions.Net/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Net/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Reflection/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Reflection/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Reflection/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Reflection/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Runtime.Caching/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Runtime.Caching/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Runtime.Caching/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Runtime.Caching/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Text.Json/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Text.Json/PackageReleaseNotes.txt index 0df8bdde7..8548a95fb 100644 --- a/.nuget/Cuemon.Extensions.Text.Json/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Text.Json/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Text/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Text/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Extensions.Text/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Text/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Threading/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Threading/PackageReleaseNotes.txt index 6ea8ae352..93b7cc5fc 100644 --- a/.nuget/Cuemon.Extensions.Threading/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Threading/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Extensions.Xml/PackageReleaseNotes.txt b/.nuget/Cuemon.Extensions.Xml/PackageReleaseNotes.txt index 65e4632e6..bcd1d6412 100644 --- a/.nuget/Cuemon.Extensions.Xml/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Extensions.Xml/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.IO/PackageReleaseNotes.txt b/.nuget/Cuemon.IO/PackageReleaseNotes.txt index 02c4b26a4..9ccd2c54e 100644 --- a/.nuget/Cuemon.IO/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.IO/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8, .NET Standard 2.1 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8, .NET Standard 2.1 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Net/PackageReleaseNotes.txt b/.nuget/Cuemon.Net/PackageReleaseNotes.txt index dd25ab356..6a42ca862 100644 --- a/.nuget/Cuemon.Net/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Net/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Resilience/PackageReleaseNotes.txt b/.nuget/Cuemon.Resilience/PackageReleaseNotes.txt index ce2b303a1..b497907e9 100644 --- a/.nuget/Cuemon.Resilience/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Resilience/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Runtime.Caching/PackageReleaseNotes.txt b/.nuget/Cuemon.Runtime.Caching/PackageReleaseNotes.txt index eb3187623..9d4048d14 100644 --- a/.nuget/Cuemon.Runtime.Caching/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Runtime.Caching/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Security.Cryptography/PackageReleaseNotes.txt b/.nuget/Cuemon.Security.Cryptography/PackageReleaseNotes.txt index 8759e7d71..350467c40 100644 --- a/.nuget/Cuemon.Security.Cryptography/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Security.Cryptography/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Threading/PackageReleaseNotes.txt b/.nuget/Cuemon.Threading/PackageReleaseNotes.txt index e95e75419..2c1a959f0 100644 --- a/.nuget/Cuemon.Threading/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Threading/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/.nuget/Cuemon.Xml/PackageReleaseNotes.txt b/.nuget/Cuemon.Xml/PackageReleaseNotes.txt index bde763f0a..1d0e66017 100644 --- a/.nuget/Cuemon.Xml/PackageReleaseNotes.txt +++ b/.nuget/Cuemon.Xml/PackageReleaseNotes.txt @@ -1,4 +1,10 @@ -Version 9.0.5 +Version 9.0.6 +Availability: .NET 9, .NET 8 and .NET Standard 2.0 +  +# ALM +- CHANGED Dependencies to latest and greatest with respect to TFMs +  +Version 9.0.5 Availability: .NET 9, .NET 8 and .NET Standard 2.0   # ALM diff --git a/CHANGELOG.md b/CHANGELOG.md index a038293f6..fc1636c5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), For more details, please refer to `PackageReleaseNotes.txt` on a per assembly basis in the `.nuget` folder. +## [9.0.6] - 2025-06-14 + +This is a service update that focuses on package dependencies and a minor new handy feature; `Cuemon.Threading.Awaiter.RunUntilSuccessfulOrTimeoutAsync` method. + +### Added + +- Awaiter class in the Cuemon.Threading namespace that provides a set of static methods for awaiting asynchronous operations: + - RunUntilSuccessfulOrTimeoutAsync repeatedly invokes a specified asynchronous lambda expression until it succeeds or a configured timeout is reached +- AsyncRunOptions class in the Cuemon.Threading namespace that provides configuration options for the RunUntilSuccessfulOrTimeoutAsync method + + ## [9.0.5] - 2025-05-13 This is a service update that focuses on package dependencies and a few bug fixes. diff --git a/src/Cuemon.Core/Threading/AsyncOptions.cs b/src/Cuemon.Core/Threading/AsyncOptions.cs index 60961d4eb..1c2ceb61c 100644 --- a/src/Cuemon.Core/Threading/AsyncOptions.cs +++ b/src/Cuemon.Core/Threading/AsyncOptions.cs @@ -34,7 +34,7 @@ public class AsyncOptions : IAsyncOptions, IParameterObject /// public AsyncOptions() { - CancellationToken = default; + CancellationToken = CancellationToken.None; } /// diff --git a/src/Cuemon.Core/Threading/AsyncRunOptions.cs b/src/Cuemon.Core/Threading/AsyncRunOptions.cs new file mode 100644 index 000000000..c41cdf4bd --- /dev/null +++ b/src/Cuemon.Core/Threading/AsyncRunOptions.cs @@ -0,0 +1,49 @@ +using System; + +namespace Cuemon.Threading +{ + /// + /// Provides options that are related to asynchronous run operations. + /// + /// + public class AsyncRunOptions : AsyncOptions + { + /// + /// Initializes a new instance of the class. + /// + /// + /// The following table shows the initial property values for an instance of . + /// + /// + /// Property + /// Initial Value + /// + /// + /// + /// 00:00:05 (5 seconds) + /// + /// + /// + /// 00:00:00.1000000 (100 milliseconds) + /// + /// + /// + public AsyncRunOptions() + { + Timeout = TimeSpan.FromSeconds(5); + Delay = TimeSpan.FromMilliseconds(100); + } + + /// + /// Gets or sets the timeout for the asynchronous operation. + /// + /// The timeout for the asynchronous operation. The default is 5 seconds. + public TimeSpan Timeout { get; set; } + + /// + /// Gets or sets the delay between asynchronous operation attempts. + /// + /// The delay between asynchronous operation attempts. The default is 100 milliseconds. + public TimeSpan Delay { get; set; } + } +} diff --git a/src/Cuemon.Core/Threading/Awaiter.cs b/src/Cuemon.Core/Threading/Awaiter.cs new file mode 100644 index 000000000..63a27855e --- /dev/null +++ b/src/Cuemon.Core/Threading/Awaiter.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; + +namespace Cuemon.Threading +{ + /// + /// Provides a set of static methods for awaiting asynchronous operations. + /// + public static class Awaiter + { + /// + /// Repeatedly invokes the specified asynchronous until it succeeds or the configured is reached. + /// + /// The asynchronous function delegate to execute, returning a indicating success or failure. + /// The which may be configured. + /// + /// A task that represents the asynchronous operation. The task result contains the returned by the last invocation of , or an unsuccessful value if the timeout is reached. + /// + /// + /// The is invoked repeatedly with a delay specified by until it returns a successful or the timeout specified by is reached. + ///
+ /// Potential exceptions thrown by are caught and collected. If the operation does not succeed before the timeout, will be conditionally initialized:
+ /// 1: No caught exceptions; initialized with default constructor,
+ /// 2: One caught exception; initialized with caught exception,
+ /// 3: Two or more exceptions; initialized with containing all exceptions. + ///
+ public static async Task RunUntilSuccessfulOrTimeoutAsync(Func> method, Action setup = null) + { + var options = Patterns.Configure(setup); + var stopwatch = Stopwatch.StartNew(); + var exceptions = new List(); + + ConditionalValue conditionalValue = null; + while (stopwatch.Elapsed <= options.Timeout) + { + try + { + options.CancellationToken.ThrowIfCancellationRequested(); + conditionalValue = await method().ConfigureAwait(false); + if (conditionalValue.Succeeded) { break; } + } + catch (Exception ex) + { + exceptions.Add(ex); + } + + await Task.Delay(options.Delay).ConfigureAwait(false); + } + + return (conditionalValue?.Succeeded ?? false) + ? conditionalValue + : await GetUnsuccessfulValue(exceptions).ConfigureAwait(false); + } + + private static Task GetUnsuccessfulValue(IList exceptions) + { + if (exceptions.Count == 0) { return Task.FromResult(new UnsuccessfulValue()); } + if (exceptions.Count == 1) { return Task.FromResult(new UnsuccessfulValue(exceptions.Single())); } + return Task.FromResult(new UnsuccessfulValue(new AggregateException(exceptions))); + } + } +} diff --git a/test/Cuemon.Core.Tests/Threading/AwaiterTest.cs b/test/Cuemon.Core.Tests/Threading/AwaiterTest.cs new file mode 100644 index 000000000..d88441da1 --- /dev/null +++ b/test/Cuemon.Core.Tests/Threading/AwaiterTest.cs @@ -0,0 +1,127 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Codebelt.Extensions.Xunit; +using Xunit; + +namespace Cuemon.Threading +{ + public class AwaiterTest : Test + { + [Fact] + public async Task RunUntilSuccessfulOrTimeoutAsync_ShouldReturnOnImmediateSuccess() + { + // Arrange + var callCount = 0; + Task Method() + { + callCount++; + return Task.FromResult(new SuccessfulValue()); + } + + // Act + var result = await Awaiter.RunUntilSuccessfulOrTimeoutAsync(Method); + + // Assert + Assert.True(result.Succeeded); + Assert.Equal(1, callCount); + } + + [Fact] + public async Task RunUntilSuccessfulOrTimeoutAsync_ShouldRetryUntilSuccess() + { + // Arrange + var callCount = 0; + Task Method() + { + callCount++; + if (callCount < 3) + return Task.FromResult(new UnsuccessfulValue()); + return Task.FromResult(new SuccessfulValue()); + } + + // Act + var result = await Awaiter.RunUntilSuccessfulOrTimeoutAsync(Method, o => + { + o.Timeout = TimeSpan.FromSeconds(2); + o.Delay = TimeSpan.FromMilliseconds(10); + }); + + // Assert + Assert.True(result.Succeeded); + Assert.Equal(3, callCount); + } + + [Fact] + public async Task RunUntilSuccessfulOrTimeoutAsync_ShouldReturnUnsuccessfulOnTimeout_NoExceptions() + { + // Arrange + Task Method() => Task.FromResult(new UnsuccessfulValue()); + + // Act + var result = await Awaiter.RunUntilSuccessfulOrTimeoutAsync(Method, o => + { + o.Timeout = TimeSpan.FromMilliseconds(50); + o.Delay = TimeSpan.FromMilliseconds(10); + }); + + // Assert + Assert.False(result.Succeeded); + Assert.Null(result.Failure); + } + + [Fact] + public async Task RunUntilSuccessfulOrTimeoutAsync_ShouldReturnUnsuccessfulWithSingleException() + { + // Arrange + var cts = new CancellationTokenSource(); + + cts.Cancel(); + + var ct = cts.Token; + + // Act + var result = await Awaiter.RunUntilSuccessfulOrTimeoutAsync(() => Task.FromResult(new UnsuccessfulValue()), o => + { + o.Timeout = TimeSpan.FromMilliseconds(10); + o.Delay = TimeSpan.FromMilliseconds(100); + o.CancellationToken = ct; + }); + + // Assert + Assert.False(result.Succeeded); + Assert.IsType(result.Failure); + } + + [Fact] + public async Task RunUntilSuccessfulOrTimeoutAsync_ShouldReturnUnsuccessfulWithAggregateException() + { + // Arrange + var exceptions = new List + { + new InvalidOperationException("fail1"), + new ArgumentException("fail2") + }; + var callCount = 0; + Task Method() + { + throw exceptions[callCount++]; + } + + // Act + var result = await Awaiter.RunUntilSuccessfulOrTimeoutAsync(Method, o => + { + o.Timeout = TimeSpan.FromMilliseconds(50); + o.Delay = TimeSpan.FromMilliseconds(10); + }); + + // Assert + Assert.False(result.Succeeded); + Assert.IsType(result.Failure); + var agg = (AggregateException)result.Failure; + Assert.Contains(exceptions[0], agg.InnerExceptions); + Assert.Contains(exceptions[1], agg.InnerExceptions); + } + } +}