Skip to content

Added .NET 8 target #696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
with:
lfs: true
fetch-depth: 0
- name: "Install .NET SDK"
uses: actions/setup-dotnet@v3.2.0
- name: "Install .NET 6.0 SDK"
uses: actions/setup-dotnet@v4.2.0
with:
dotnet-version: |
6.0.x
global-json-file: "./global.json"
8.0.x
- name: "Dotnet Tool Restore"
run: dotnet tool restore
shell: pwsh
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -352,3 +352,4 @@ MigrationBackup/
.ionide/

Artefacts/
/.idea
3 changes: 3 additions & 0 deletions Benchmarks/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ dotnet_diagnostic.SA1602.severity = none
# Justification: Comments turned off
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md
dotnet_diagnostic.SA1633.severity = none

# CA1515: Consider making public types internal
dotnet_diagnostic.CA1515.severity = none
30 changes: 15 additions & 15 deletions Benchmarks/Schema.NET.Benchmarks/Core/BookBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,68 @@ namespace Schema.NET.Benchmarks.Core;
public class BookBenchmark : SchemaBenchmarkBase
{
public override Thing InitialiseThing() =>
new Book()
new Book
{
Id = new Uri("https://example.com/book/1"),
Name = "The Catcher in the Rye",
Author = new Person()
Author = new Person
{
Name = "J.D. Salinger",
},
Url = new Uri("https://www.barnesandnoble.com/store/info/offer/JDSalinger"),
WorkExample = new List<ICreativeWork>()
WorkExample = new List<ICreativeWork?>
{
new Book()
new Book
{
Isbn = "031676948",
BookEdition = "2nd Edition",
BookFormat = BookFormatType.Hardcover,
PotentialAction = new ReadAction()
PotentialAction = new ReadAction
{
Target = new EntryPoint()
Target = new EntryPoint
{
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/0316769487?purchase=true",
ActionPlatform = new List<Uri>()
ActionPlatform = new List<Uri?>
{
new Uri("https://schema.org/DesktopWebPlatform"),
new Uri("https://schema.org/IOSPlatform"),
new Uri("https://schema.org/AndroidPlatform"),
},
},
ExpectsAcceptanceOf = new Offer()
ExpectsAcceptanceOf = new Offer
{
Price = 6.99M,
PriceCurrency = "USD",
EligibleRegion = new Country()
EligibleRegion = new Country
{
Name = "US",
},
Availability = ItemAvailability.InStock,
},
},
},
new Book()
new Book
{
Isbn = "031676947",
BookEdition = "1st Edition",
BookFormat = BookFormatType.EBook,
PotentialAction = new ReadAction()
PotentialAction = new ReadAction
{
Target = new EntryPoint()
Target = new EntryPoint
{
UrlTemplate = "https://www.barnesandnoble.com/store/info/offer/031676947?purchase=true",
ActionPlatform = new List<Uri>()
ActionPlatform = new List<Uri?>
{
new Uri("https://schema.org/DesktopWebPlatform"),
new Uri("https://schema.org/IOSPlatform"),
new Uri("https://schema.org/AndroidPlatform"),
},
},
ExpectsAcceptanceOf = new Offer()
ExpectsAcceptanceOf = new Offer
{
Price = 1.99M,
PriceCurrency = "USD",
EligibleRegion = new Country()
EligibleRegion = new Country
{
Name = "UK",
},
Expand Down
4 changes: 2 additions & 2 deletions Benchmarks/Schema.NET.Benchmarks/Core/WebsiteBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ namespace Schema.NET.Benchmarks.Core;
public class WebsiteBenchmark : SchemaBenchmarkBase
{
public override Thing InitialiseThing() =>
new WebSite()
new WebSite
{
PotentialAction = new SearchAction()
PotentialAction = new SearchAction
{
Target = new Uri("https://example.com/search?&q={query}"),
QueryInput = "required",
Expand Down
2 changes: 1 addition & 1 deletion Benchmarks/Schema.NET.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace Schema.NET.Benchmarks;

using BenchmarkDotNet.Running;

public class Program
internal static class Program
{
private static void Main(string[] args) =>
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
Expand Down
5 changes: 3 additions & 2 deletions Benchmarks/Schema.NET.Benchmarks/Schema.NET.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@

<PropertyGroup Label="Build">
<OutputType>Exe</OutputType>
<TargetFrameworks>net7.0;net6.0;net472</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;net48</TargetFrameworks>
<IsPackable>false</IsPackable>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

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

<ItemGroup Label="Package References">
<PackageReference Include="BenchmarkDotNet" Version="0.13.8" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions Benchmarks/Schema.NET.Benchmarks/SchemaBenchmarkBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ namespace Schema.NET.Benchmarks;
[HtmlExporter]
[CsvMeasurementsExporter]
[RPlotExporter]
[SimpleJob(RuntimeMoniker.Net70)]
[SimpleJob(RuntimeMoniker.Net80)]
[SimpleJob(RuntimeMoniker.Net60)]
[SimpleJob(RuntimeMoniker.Net472)]
[SimpleJob(RuntimeMoniker.Net48)]
public abstract class SchemaBenchmarkBase
{
public Thing Thing { get; set; } = default!;
Expand Down
Loading