Skip to content

Commit 8e58719

Browse files
committed
Restore support for .NET Standard 2.0
1 parent 06f16d2 commit 8e58719

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

Directory.Packages.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<PackageVersion Include="xunit" Version="2.9.3" />
1212
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
1313
</ItemGroup>
14+
<ItemGroup>
15+
<GlobalPackageReference Include="PolySharp" Version="1.16.0" />
16+
</ItemGroup>
1417
<!-- DO NOT EDIT: dotnet-common-props/analyzers convention -->
1518
<ItemGroup>
1619
<GlobalPackageReference Include="Faithlife.Analyzers" Version="1.*" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#if !NET
2+
using System.Runtime.CompilerServices;
3+
4+
namespace Faithlife.Parsing;
5+
6+
internal static class ExceptionExtensions
7+
{
8+
extension(ArgumentNullException)
9+
{
10+
public static void ThrowIfNull(object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
11+
{
12+
if (argument is null)
13+
throw new ArgumentNullException(paramName);
14+
}
15+
}
16+
}
17+
#endif

src/Faithlife.Parsing/Faithlife.Parsing.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
55
<Description>A simple library for constructing parsers in C#.</Description>
66
<PackageTags>parser parsers</PackageTags>
77
<IsPackable>true</IsPackable>

0 commit comments

Comments
 (0)