Skip to content

Commit

Permalink
fix: use net6.0 or greater directive
Browse files Browse the repository at this point in the history
  • Loading branch information
phnx47 committed Jun 15, 2024
1 parent 0e992f6 commit 60eae42
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/FingerprintBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class FingerprintBuilder<T> : IFingerprintBuilder<T>

private readonly Type[] _supportedTypes =
{
#if HasNewTypes
#if NET6_0_OR_GREATER
typeof(Half),
#endif
typeof(bool),
Expand Down Expand Up @@ -156,7 +156,7 @@ public Func<T, byte[]> Build()
case string typedValue:
binaryWriter.Write(typedValue);
break;
#if HasNewTypes
#if NET6_0_OR_GREATER
case Half typedValue:
binaryWriter.Write(typedValue);
break;
Expand Down
3 changes: 0 additions & 3 deletions src/FingerprintBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
<None Include="../icon.png" Pack="true" Visible="false" PackagePath="" />
<None Include="../README.md" Pack="true" Visible="false" PackagePath="" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<DefineConstants>$(DefineConstants);HasNewTypes</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions tests/units/FingerprintBuilder.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<CoverletOutputFormat>opencover</CoverletOutputFormat>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<DefineConstants>$(DefineConstants);HasNewTypes</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.1" />
Expand Down
2 changes: 1 addition & 1 deletion tests/units/TypedTests/HalfTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if HasNewTypes
#if NET6_0_OR_GREATER
using System;
using System.Security.Cryptography;
using FingerprintBuilder.Tests.Models;
Expand Down

0 comments on commit 60eae42

Please sign in to comment.