Skip to content

Commit d256187

Browse files
committed
Add support for .NET 10
1 parent 6589fec commit d256187

26 files changed

Lines changed: 159 additions & 139 deletions

.github/workflows/build_and_test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v4
12+
- uses: actions/checkout@v5
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Setup .NET
17-
uses: actions/setup-dotnet@v4
17+
uses: actions/setup-dotnet@v5
1818
with:
1919
dotnet-version: |
20-
6.0.x
2120
8.0.x
2221
9.0.x
22+
10.0.x
2323
2424
- name: Run tests
2525
run: dotnet test
@@ -36,7 +36,7 @@ jobs:
3636
git push origin rolling --force
3737
3838
- name: Upload to rolling
39-
uses: ncipollo/release-action@v1.14.0
39+
uses: ncipollo/release-action@v1.20.0
4040
with:
4141
allowUpdates: True
4242
artifacts: "*.nupkg,*.snupkg"

.github/workflows/check_pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
9+
- uses: actions/checkout@v5
1010

1111
- name: Setup .NET
12-
uses: actions/setup-dotnet@v4
12+
uses: actions/setup-dotnet@v5
1313
with:
1414
dotnet-version: |
15-
6.0.x
1615
8.0.x
1716
9.0.x
17+
10.0.x
1818
1919
- name: Build
2020
run: dotnet build

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/RedumpTool/bin/Debug/net9.0/RedumpTool.dll",
13+
"program": "${workspaceFolder}/RedumpTool/bin/Debug/net10.0/RedumpTool.dll",
1414
"args": [],
1515
"cwd": "${workspaceFolder}/RedumpTool",
1616
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console

RedumpTool/RedumpTool.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
<CheckEolTargetFramework>false</CheckEolTargetFramework>
77
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
@@ -23,7 +23,7 @@
2323
<RuntimeIdentifiers>win-x86;win-x64;win-arm64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>
2424
</PropertyGroup>
2525
<PropertyGroup Condition="$(RuntimeIdentifier.StartsWith(`osx-arm`))">
26-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
26+
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
2727
</PropertyGroup>
2828

2929
<ItemGroup>

SabreTools.RedumpLib.Test/BuilderTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void InjectSubmissionInformation_BothNull_Null()
3939
[Fact]
4040
public void InjectSubmissionInformation_ValidInputNullSeed_Valid()
4141
{
42-
SubmissionInfo? si = new SubmissionInfo();
42+
SubmissionInfo? si = new();
4343
SubmissionInfo? seed = null;
4444

4545
var actual = Builder.InjectSubmissionInformation(si, seed);
@@ -49,8 +49,8 @@ public void InjectSubmissionInformation_ValidInputNullSeed_Valid()
4949
[Fact]
5050
public void InjectSubmissionInformation_BothValid_Valid()
5151
{
52-
SubmissionInfo? si = new SubmissionInfo();
53-
SubmissionInfo? seed = new SubmissionInfo();
52+
SubmissionInfo? si = new();
53+
SubmissionInfo? seed = new();
5454

5555
var actual = Builder.InjectSubmissionInformation(si, seed);
5656
Assert.NotNull(actual);

SabreTools.RedumpLib.Test/Data/ExtensionsTests.cs

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

SabreTools.RedumpLib.Test/DownloaderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ public class DownloaderTests
55
// Tests here will require installing and using the Moq library
66
// to mock the RedumpClient type.
77
}
8-
}
8+
}

SabreTools.RedumpLib.Test/FormatterTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void FormatOutputData_VAE_Formatted()
6767
string expected = "Version and Editions:\n\tVersion: XXXXXX\n\tEdition/Release: XXXXXX\n";
6868

6969
var builder = new StringBuilder();
70-
VersionAndEditionsSection? section = new VersionAndEditionsSection
70+
VersionAndEditionsSection? section = new()
7171
{
7272
Version = "XXXXXX",
7373
OtherEditions = "XXXXXX",
@@ -119,7 +119,7 @@ public void FormatOutputData_EDC_Formatted()
119119
string expected = "EDC:\n\tEDC: Yes\n";
120120

121121
var builder = new StringBuilder();
122-
EDCSection? section = new EDCSection { EDC = YesNo.Yes };
122+
EDCSection? section = new() { EDC = YesNo.Yes };
123123
RedumpSystem? system = RedumpSystem.SonyPlayStation;
124124

125125
Formatter.FormatOutputData(builder, section, system);
@@ -152,7 +152,7 @@ public void FormatOutputData_ExtrasInvalid_Empty()
152152
string expected = string.Empty;
153153

154154
var builder = new StringBuilder();
155-
ExtrasSection? section = new ExtrasSection
155+
ExtrasSection? section = new()
156156
{
157157
PVD = null,
158158
PIC = null,
@@ -172,7 +172,7 @@ public void FormatOutputData_Extras_Formatted()
172172
string expected = "Extras:\n\tPrimary Volume Descriptor (PVD): XXXXXX\n\tDisc Key: XXXXXX\n\tDisc ID: XXXXXX\n\tPermanent Information & Control (PIC): XXXXXX\n\tHeader: XXXXXX\n\tBCA: XXXXXX\n\tSecurity Sector Ranges: XXXXXX\n";
173173

174174
var builder = new StringBuilder();
175-
ExtrasSection? section = new ExtrasSection
175+
ExtrasSection? section = new()
176176
{
177177
PVD = "XXXXXX",
178178
DiscKey = "XXXXXX",
@@ -214,7 +214,7 @@ public void FormatOutputData_COPInvalid_Empty()
214214
string expected = string.Empty;
215215

216216
var builder = new StringBuilder();
217-
CopyProtectionSection? section = new CopyProtectionSection
217+
CopyProtectionSection? section = new()
218218
{
219219
Protection = null,
220220
AntiModchip = null,
@@ -236,7 +236,7 @@ public void FormatOutputData_COP_Formatted()
236236
string expected = "Copy Protection:\n\tCopy Protection: XXXXXX\n\tSubIntention Data (SecuROM/LibCrypt): XXXXXX\n";
237237

238238
var builder = new StringBuilder();
239-
CopyProtectionSection? section = new CopyProtectionSection
239+
CopyProtectionSection? section = new()
240240
{
241241
AntiModchip = YesNo.Yes,
242242
LibCrypt = YesNo.Yes,
@@ -258,7 +258,7 @@ public void FormatOutputData_COPPSX_Formatted()
258258
string expected = "Copy Protection:\n\tAnti-modchip: Yes\n\tLibCrypt: Yes\n\tSubIntention Data (SecuROM/LibCrypt): XXXXXX\n\tCopy Protection: XXXXXX\n\tSubIntention Data (SecuROM/LibCrypt): XXXXXX\n";
259259

260260
var builder = new StringBuilder();
261-
CopyProtectionSection? section = new CopyProtectionSection
261+
CopyProtectionSection? section = new()
262262
{
263263
AntiModchip = YesNo.Yes,
264264
LibCrypt = YesNo.Yes,
@@ -284,7 +284,7 @@ public void FormatOutputData_TAWOInvalid_Minimal()
284284
string expected = "Tracks and Write Offsets:\n\tDAT:\n\n\n\n\n";
285285

286286
var builder = new StringBuilder();
287-
TracksAndWriteOffsetsSection? section = new TracksAndWriteOffsetsSection();
287+
TracksAndWriteOffsetsSection? section = new();
288288

289289
Formatter.FormatOutputData(builder, section);
290290

@@ -298,7 +298,7 @@ public void FormatOutputData_TAWO_Formatted()
298298
string expected = "Tracks and Write Offsets:\n\tDAT:\n\nXXXXXX\n\n\n\tCuesheet: XXXXXX\n\tWrite Offset: XXXXXX\n";
299299

300300
var builder = new StringBuilder();
301-
TracksAndWriteOffsetsSection? section = new TracksAndWriteOffsetsSection
301+
TracksAndWriteOffsetsSection? section = new()
302302
{
303303
ClrMameProData = "XXXXXX",
304304
Cuesheet = "XXXXXX",
@@ -341,7 +341,7 @@ public void FormatOutputData_DI_Formatted()
341341
string expected = "Dumping Info:\n\tFrontend Version: XXXXXX\n\tDumping Program: XXXXXX\n\tDate: XXXXXX\n\tParameters: XXXXXX\n\tManufacturer: XXXXXX\n\tModel: XXXXXX\n\tFirmware: XXXXXX\n\tReported Disc Type: XXXXXX\n\tC2 Error Count: XXXXXX\n";
342342

343343
var builder = new StringBuilder();
344-
DumpingInfoSection? section = new DumpingInfoSection
344+
DumpingInfoSection? section = new()
345345
{
346346
FrontendVersion = "XXXXXX",
347347
DumpingProgram = "XXXXXX",

SabreTools.RedumpLib.Test/SabreTools.RedumpLib.Test.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
4+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
55
<CheckEolTargetFramework>false</CheckEolTargetFramework>
66
<LangVersion>latest</LangVersion>
77
<Nullable>enable</Nullable>
@@ -24,11 +24,11 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<PackageReference Include="Microsoft.CodeCoverage" Version="18.0.0" />
28-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
27+
<PackageReference Include="Microsoft.CodeCoverage" Version="18.0.1" />
28+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
2929
<PackageReference Include="xunit" Version="2.9.3" />
3030
<PackageReference Include="xunit.abstractions" Version="2.0.3" />
31-
<PackageReference Include="xunit.analyzers" Version="1.24.0" />
31+
<PackageReference Include="xunit.analyzers" Version="1.25.0" />
3232
<PackageReference Include="xunit.assert" Version="2.9.3" />
3333
<PackageReference Include="xunit.core" Version="2.9.3" />
3434
<PackageReference Include="xunit.extensibility.core" Version="2.9.3" />

SabreTools.RedumpLib.Test/SubmissionInfoTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void FullSerializationTest()
4444
{
4545
SchemaVersion = 1,
4646
FullyMatchedID = 3,
47-
PartiallyMatchedIDs = new List<int> { 0, 1, 2, 3 },
47+
PartiallyMatchedIDs = [0, 1, 2, 3],
4848
Added = DateTime.UtcNow,
4949
LastModified = DateTime.UtcNow,
5050

0 commit comments

Comments
 (0)