Port extension attribute instead of framework gating

This commit is contained in:
Matt Nadareski
2024-11-15 20:40:01 -05:00
parent fb15aecb87
commit 72ff3ead48
8 changed files with 10 additions and 11 deletions

View File

@@ -0,0 +1,9 @@
#if NET20
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
internal sealed class ExtensionAttribute : Attribute {}
}
#endif

View File

@@ -8,7 +8,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -7,7 +7,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -7,7 +7,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -6,7 +6,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -8,7 +8,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -7,7 +7,6 @@ using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#pragma warning disable CS0618 // Obsolete unmanaged types
namespace SabreTools.IO.Extensions
{
/// <summary>

View File

@@ -4,6 +4,7 @@
<!-- Assembly Properties -->
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<NoWarn>CS0618</NoWarn>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>1.5.0</Version>
@@ -24,11 +25,6 @@
<None Include="../README.md" Pack="true" PackagePath="" />
</ItemGroup>
<!-- Support for old .NET versions -->
<ItemGroup Condition="$(TargetFramework.StartsWith(`net2`))">
<PackageReference Include="Net30.LinqBridge" Version="1.3.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SabreTools.Matching" Version="1.4.0" />
</ItemGroup>