Upgrade to .NET 8.0.

This commit is contained in:
2023-09-19 16:36:34 +01:00
parent 4fb9fccba8
commit a31c21f141
8 changed files with 57 additions and 57 deletions

View File

@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp3.1;net7.0</TargetFrameworks> <TargetFrameworks>netcoreapp3.1;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
@@ -18,7 +18,7 @@
<PackageReference Include="SharpCompress" Version="0.29.0" /> <PackageReference Include="SharpCompress" Version="0.29.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' "> <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="DotNetZip" Version="1.16.0"/> <PackageReference Include="DotNetZip" Version="1.16.0"/>
<PackageReference Include="SharpCompress" Version="0.34.0" /> <PackageReference Include="SharpCompress" Version="0.34.0" />
</ItemGroup> </ItemGroup>
@@ -70,7 +70,7 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0' "> <ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ProjectReference Include="..\Aaru6.Checksums\Aaru6.Checksums.csproj"/> <ProjectReference Include="..\Aaru6.Checksums\Aaru6.Checksums.csproj"/>
<ProjectReference Include="..\Aaru6.Compression\Aaru6.Compression.csproj"/> <ProjectReference Include="..\Aaru6.Compression\Aaru6.Compression.csproj"/>
</ItemGroup> </ItemGroup>

View File

@@ -2,16 +2,16 @@ using System;
using AaruBenchmark.Checksums; using AaruBenchmark.Checksums;
using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs; using BenchmarkDotNet.Jobs;
#if NET7_0 #if NET8_0_OR_GREATER
using AaruBenchmark.Compression; using AaruBenchmark.Compression;
#endif #endif
namespace AaruBenchmark; namespace AaruBenchmark;
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class ADCBenchs public class ADCBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -32,10 +32,10 @@ public class ADCBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class AppleRleBenchs public class AppleRleBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -56,10 +56,10 @@ public class AppleRleBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class TeleDiskLzhBenchs public class TeleDiskLzhBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -74,10 +74,10 @@ public class TeleDiskLzhBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class GzipBenchs public class GzipBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -95,10 +95,10 @@ public class GzipBenchs
public void DotNetZip() => Compression.DotNetZip.Gzip(); public void DotNetZip() => Compression.DotNetZip.Gzip();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class CompressGzipBenchs public class CompressGzipBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -116,10 +116,10 @@ public class CompressGzipBenchs
public void DotNetZip() => Compression.DotNetZip.CompressGzip(); public void DotNetZip() => Compression.DotNetZip.CompressGzip();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Bzip2Benchs public class Bzip2Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -140,10 +140,10 @@ public class Bzip2Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class CompressBzip2Benchs public class CompressBzip2Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -164,13 +164,13 @@ public class CompressBzip2Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class LzipBenchs public class LzipBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.SharpCompress.Lzip(); public void Aaru() => Compression.SharpCompress.Lzip();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.Lzip(); public void AaruNative() => Compression.AaruNative.Lzip();
#else #else
@@ -179,13 +179,13 @@ public class LzipBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class CompressLzipBenchs public class CompressLzipBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.SharpCompress.CompressLzip(); public void Aaru() => Compression.SharpCompress.CompressLzip();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.CompressLzip(); public void AaruNative() => Compression.AaruNative.CompressLzip();
#else #else
@@ -194,12 +194,12 @@ public class CompressLzipBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class LzmaBenchs public class LzmaBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.SharpCompress.Lzma(); public void Aaru() => Compression.SharpCompress.Lzma();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.Lzma(); public void AaruNative() => Compression.AaruNative.Lzma();
#else #else
@@ -208,13 +208,13 @@ public class LzmaBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class CompressLzmaBenchs public class CompressLzmaBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.SharpCompress.CompressLzma(); public void Aaru() => Compression.SharpCompress.CompressLzma();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.CompressLzma(); public void AaruNative() => Compression.AaruNative.CompressLzma();
#else #else
@@ -223,13 +223,13 @@ public class CompressLzmaBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class FlacBenchs public class FlacBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.Aaru.Flac(); public void Aaru() => Compression.Aaru.Flac();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.Flac(); public void AaruNative() => Compression.AaruNative.Flac();
#else #else
@@ -238,13 +238,13 @@ public class FlacBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class CompressFlacBenchs public class CompressFlacBenchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
public void Aaru() => Compression.Aaru.CompressFlac(); public void Aaru() => Compression.Aaru.CompressFlac();
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void AaruNative() => Compression.AaruNative.CompressFlac(); public void AaruNative() => Compression.AaruNative.CompressFlac();
#else #else
@@ -253,10 +253,10 @@ public class CompressFlacBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Adler32Benchs public class Adler32Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -277,10 +277,10 @@ public class Adler32Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Fletcher16Benchs public class Fletcher16Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -301,10 +301,10 @@ public class Fletcher16Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Fletcher32Benchs public class Fletcher32Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -325,10 +325,10 @@ public class Fletcher32Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Crc16CcittBenchs public class Crc16CcittBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -349,10 +349,10 @@ public class Crc16CcittBenchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Crc16Benchs public class Crc16Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -373,10 +373,10 @@ public class Crc16Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Crc32Benchs public class Crc32Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -400,10 +400,10 @@ public class Crc32Benchs
public void rhash() => RHash.Crc32(); public void rhash() => RHash.Crc32();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Crc64Benchs public class Crc64Benchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();
@@ -424,7 +424,7 @@ public class Crc64Benchs
#endif #endif
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Md5Benchs public class Md5Benchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
@@ -437,7 +437,7 @@ public class Md5Benchs
public void rhash() => RHash.Md5(); public void rhash() => RHash.Md5();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Sha1Benchs public class Sha1Benchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
@@ -450,7 +450,7 @@ public class Sha1Benchs
public void rhash() => RHash.Sha1(); public void rhash() => RHash.Sha1();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Sha256Benchs public class Sha256Benchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
@@ -463,7 +463,7 @@ public class Sha256Benchs
public void rhash() => RHash.Sha256(); public void rhash() => RHash.Sha256();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Sha384Benchs public class Sha384Benchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
@@ -476,7 +476,7 @@ public class Sha384Benchs
public void rhash() => RHash.Sha384(); public void rhash() => RHash.Sha384();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class Sha512Benchs public class Sha512Benchs
{ {
[Benchmark(Baseline = true)] [Benchmark(Baseline = true)]
@@ -489,10 +489,10 @@ public class Sha512Benchs
public void rhash() => RHash.Sha512(); public void rhash() => RHash.Sha512();
} }
[SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net70), SimpleJob(RuntimeMoniker.NativeAot70)] [SimpleJob(RuntimeMoniker.NetCoreApp31), SimpleJob(RuntimeMoniker.Net80), SimpleJob(RuntimeMoniker.NativeAot80)]
public class SpamSumBenchs public class SpamSumBenchs
{ {
#if NET7_0 #if NET8_0_OR_GREATER
[Benchmark] [Benchmark]
public void Aaru() => throw new NotImplementedException(); public void Aaru() => throw new NotImplementedException();

View File

@@ -1,4 +1,4 @@
#if NET7_0 #if NET8_0_OR_GREATER
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;

View File

@@ -1,4 +1,4 @@
#if NET7_0 #if NET8_0_OR_GREATER
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;

View File

@@ -1,5 +1,5 @@
using System.IO; using System.IO;
#if NET7_0 #if NET8_0_OR_GREATER
using Aaru6.Checksums; using Aaru6.Checksums;
#else #else
using Aaru.Checksums; using Aaru.Checksums;

View File

@@ -1,4 +1,4 @@
#if NET7_0 #if NET8_0_OR_GREATER
using System.IO; using System.IO;
using Aaru6.Checksums; using Aaru6.Checksums;
using Aaru6.Compression; using Aaru6.Compression;

View File

@@ -1,4 +1,4 @@
#if NET7_0 #if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;

View File

@@ -1,5 +1,5 @@
using System.IO; using System.IO;
#if NET7_0 #if NET8_0_OR_GREATER
using Aaru6.Checksums; using Aaru6.Checksums;
#else #else
using Aaru.Checksums; using Aaru.Checksums;