support for dotnet9 compilation
All checks were successful
.NET Test / test (push) Successful in 2m2s
All checks were successful
.NET Test / test (push) Successful in 2m2s
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: https://github.com/actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-version: 9.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore Railway/Railway.csproj
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- name: Setup .NET
|
||||
uses: https://github.com/actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-version: 9.x
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
@@ -30,12 +30,12 @@ jobs:
|
||||
run: dotnet build --no-restore
|
||||
|
||||
- name: Test
|
||||
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults-8.x"
|
||||
run: dotnet test --no-build --verbosity normal --logger trx --results-directory "TestResults-9.x"
|
||||
|
||||
- name: Upload dotnet test results
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: dotnet-results-8.x
|
||||
path: TestResults-8.x
|
||||
name: dotnet-results-9.x
|
||||
path: TestResults-9.x
|
||||
if: ${{ always() }}
|
||||
retention-days: 30
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2023-2024 JustFixMe
|
||||
Copyright (c) 2023-2025 JustFixMe
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -223,13 +223,20 @@ public sealed class ExceptionalError : Error
|
||||
if (!(exception.Data?.Count > 0))
|
||||
return ImmutableDictionary<string, string>.Empty;
|
||||
|
||||
var values = GetGenericExtData(exception);
|
||||
|
||||
return values is not null ? values.ToImmutable() : ImmutableDictionary<string, string>.Empty;
|
||||
}
|
||||
|
||||
private static ImmutableDictionary<string, string>.Builder? GetGenericExtData(Exception ex)
|
||||
{
|
||||
ImmutableDictionary<string, string>.Builder? values = null;
|
||||
|
||||
foreach (var key in exception.Data.Keys)
|
||||
foreach (var key in ex.Data.Keys)
|
||||
{
|
||||
if (key is null) continue;
|
||||
|
||||
var value = exception.Data[key];
|
||||
var value = ex.Data[key];
|
||||
if (value is null) continue;
|
||||
|
||||
var keyString = key.ToString();
|
||||
@@ -239,7 +246,8 @@ public sealed class ExceptionalError : Error
|
||||
values ??= ImmutableDictionary.CreateBuilder<string, string>();
|
||||
values.Add(keyString, valueString);
|
||||
}
|
||||
return values is not null ? values.ToImmutable() : ImmutableDictionary<string, string>.Empty;
|
||||
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
|
||||
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<LangVersion>10.0</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="xunit" Version="2.6.1" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.3">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.0">
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.4">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
|
||||
Reference in New Issue
Block a user