Skip to content

Commit 7975673

Browse files
authored
Merge pull request #1 from multiarc/main
Feature/net8 support (#1)
2 parents 4d9be90 + fc551ac commit 7975673

File tree

71 files changed

+4980
-677
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+4980
-677
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ jobs:
3333
with:
3434
lfs: true
3535
fetch-depth: 0
36-
- name: "Install .NET SDK"
37-
uses: actions/setup-dotnet@v3.2.0
36+
- name: "Install .NET 6.0 SDK"
37+
uses: actions/setup-dotnet@v4.2.0
3838
with:
39-
dotnet-version: |
40-
6.0.x
41-
global-json-file: "./global.json"
39+
dotnet-version: 6.0.x
40+
- name: "Install .NET 8.0 SDK"
41+
uses: actions/setup-dotnet@v4.2.0
42+
with:
43+
dotnet-version: 8.0.x
4244
- name: "Dotnet Tool Restore"
4345
run: dotnet tool restore
4446
shell: pwsh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,4 @@ MigrationBackup/
352352
.ionide/
353353

354354
Artefacts/
355+
/.idea

Benchmarks/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,6 @@ dotnet_diagnostic.SA1602.severity = none
3838
# Justification: Comments turned off
3939
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md
4040
dotnet_diagnostic.SA1633.severity = none
41+
42+
# CA1515: Consider making public types internal
43+
dotnet_diagnostic.CA1515.severity = none

Benchmarks/Schema.NET.Benchmarks/Core/BookBenchmark.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,68 @@ namespace Schema.NET.Benchmarks.Core;
66
public class BookBenchmark : SchemaBenchmarkBase
77
{
88
public override Thing InitialiseThing() =>
9-
new Book()
9+
new Book
1010
{
1111
Id = new Uri("https://example.com/book/1"),
1212
Name = "The Catcher in the Rye",
13-
Author = new Person()
13+
Author = new Person
1414
{
1515
Name = "J.D. Salinger",
1616
},
1717
Url = new Uri("https://www.barnesandnoble.com/store/info/offer/JDSalinger"),
18-
WorkExample = new List<ICreativeWork>()
18+
WorkExample = new List<ICreativeWork?>
1919
{
20-
new Book()
20+
new Book
2121
{
2222
Isbn = "031676948",
2323
BookEdition = "2nd Edition",
2424
BookFormat = BookFormatType.Hardcover,
25-
PotentialAction = new ReadAction()
25+
PotentialAction = new ReadAction
2626
{
27-
Target = new EntryPoint()
27+
Target = new EntryPoint
2828
{
2929
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/0316769487?purchase=true",
30-
ActionPlatform = new List<Uri>()
30+
ActionPlatform = new List<Uri?>
3131
{
3232
new Uri("https://schema.org/DesktopWebPlatform"),
3333
new Uri("https://schema.org/IOSPlatform"),
3434
new Uri("https://schema.org/AndroidPlatform"),
3535
},
3636
},
37-
ExpectsAcceptanceOf = new Offer()
37+
ExpectsAcceptanceOf = new Offer
3838
{
3939
Price = 6.99M,
4040
PriceCurrency = "USD",
41-
EligibleRegion = new Country()
41+
EligibleRegion = new Country
4242
{
4343
Name = "US",
4444
},
4545
Availability = ItemAvailability.InStock,
4646
},
4747
},
4848
},
49-
new Book()
49+
new Book
5050
{
5151
Isbn = "031676947",
5252
BookEdition = "1st Edition",
5353
BookFormat = BookFormatType.EBook,
54-
PotentialAction = new ReadAction()
54+
PotentialAction = new ReadAction
5555
{
56-
Target = new EntryPoint()
56+
Target = new EntryPoint
5757
{
5858
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/031676947?purchase=true",
59-
ActionPlatform = new List<Uri>()
59+
ActionPlatform = new List<Uri?>
6060
{
6161
new Uri("https://schema.org/DesktopWebPlatform"),
6262
new Uri("https://schema.org/IOSPlatform"),
6363
new Uri("https://schema.org/AndroidPlatform"),
6464
},
6565
},
66-
ExpectsAcceptanceOf = new Offer()
66+
ExpectsAcceptanceOf = new Offer
6767
{
6868
Price = 1.99M,
6969
PriceCurrency = "USD",
70-
EligibleRegion = new Country()
70+
EligibleRegion = new Country
7171
{
7272
Name = "UK",
7373
},

Benchmarks/Schema.NET.Benchmarks/Core/WebsiteBenchmark.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ namespace Schema.NET.Benchmarks.Core;
55
public class WebsiteBenchmark : SchemaBenchmarkBase
66
{
77
public override Thing InitialiseThing() =>
8-
new WebSite()
8+
new WebSite
99
{
10-
PotentialAction = new SearchAction()
10+
PotentialAction = new SearchAction
1111
{
1212
Target = new Uri("https://example.com/search?&q={query}"),
1313
QueryInput = "required",

Benchmarks/Schema.NET.Benchmarks/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Schema.NET.Benchmarks;
22

33
using BenchmarkDotNet.Running;
44

5-
public class Program
5+
internal static class Program
66
{
77
private static void Main(string[] args) =>
88
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);

Benchmarks/Schema.NET.Benchmarks/Schema.NET.Benchmarks.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
<PropertyGroup Label="Build">
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net7.0;net6.0;net472</TargetFrameworks>
5+
<TargetFrameworks>net8.0;net6.0;net462;net472;net48</TargetFrameworks>
66
<IsPackable>false</IsPackable>
7+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
78
</PropertyGroup>
89

910
<ItemGroup Label="Project References">
1011
<ProjectReference Include="..\..\Source\Schema.NET\Schema.NET.csproj" />
1112
</ItemGroup>
1213

1314
<ItemGroup Label="Package References">
14-
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
15+
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
1516
</ItemGroup>
1617

1718
</Project>

Benchmarks/Schema.NET.Benchmarks/SchemaBenchmarkBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ namespace Schema.NET.Benchmarks;
1212
[HtmlExporter]
1313
[CsvMeasurementsExporter]
1414
[RPlotExporter]
15-
[SimpleJob(RuntimeMoniker.Net70)]
15+
[SimpleJob(RuntimeMoniker.Net80)]
1616
[SimpleJob(RuntimeMoniker.Net60)]
17+
[SimpleJob(RuntimeMoniker.Net462)]
1718
[SimpleJob(RuntimeMoniker.Net472)]
19+
[SimpleJob(RuntimeMoniker.Net48)]
1820
public abstract class SchemaBenchmarkBase
1921
{
2022
public Thing Thing { get; set; } = default!;

0 commit comments

Comments
 (0)