Back-fix FluentReverse for .NET Framework & drop test targets with no breaking changes.#1487
Back-fix FluentReverse for .NET Framework & drop test targets with no breaking changes.#1487ha-ves wants to merge 3 commits intosipsorcery-org:masterfrom
Conversation
* Use 'latest' C# language version * TFM conditional compilation * update packages * additional extensions
* drop net9 from test projects
|
Why is this There's a lot of unnecessary reversing going on here. Have a look at #1434, where there's no reverses going on. |
It was the path of least resistance for initial upgrade step. As for the issue in this PR, for some reason it's fine with dotnet sdk 10, but not when I used dotnet sdk 9. I'm reverting to draft for this PR, because the code changes will be minimal, just removing TargetFrameworks..., and in CI I think we choose to only test for latest framework anyway... I'm also not sure about the |
|
@ha-ves is the new method needed for a subsequent PR? If so it'd be better to include it at that time. RIght now it's an orphaned method that's never used. |
Why would you want to use .NET SDK 9? |
The arrays from .NET Framework dependencies (System.Memory) is using arrays which does not have the new
FluentReverseimplementation.This is a shorter fix than decorating with
#ifs.Copilot:
This pull request introduces a new utility method for reversing arrays in a fluent style and updates the test project target frameworks by removing support for .NET 9.0. The most significant changes are the addition of the
FluentReverseextension method for arrays and the cleanup of test project configurations.New utility method
FluentReverse<T>extension method to arrays inTypeExtensions, allowing fluent-style reversal using LINQ'sReverse()(src/sys/TypeExtensions.cs).using System.Linq;to support the new extension method (src/sys/TypeExtensions.cs).Test project configuration updates
.NET 9.0from the target frameworks inSIPSorcery.IntegrationTests.csprojto only support.NET 462,.NET 8.0, and.NET 10.0(test/integration/SIPSorcery.IntegrationTests.csproj)..NET 9.0from the target frameworks inSIPSorcery.UnitTests.csproj(test/unit/SIPSorcery.UnitTests.csproj).