Skip to content

Commit

Permalink
Revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCiliaVincenti committed Sep 7, 2024
1 parent d084b8d commit 252e622
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<PackageProjectUrl>https://github.com/MarkCiliaVincenti/Backport.System.Threading.Lock</PackageProjectUrl>
<Copyright>MIT</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Version>2.0.1</Version>
<Version>2.0.0</Version>
<PackageIcon>logo.png</PackageIcon>
<PackageReleaseNotes>Breaking change that requires different usage for projects targeting frameworks prior to .NET 5.0 in order to cater for potential thread aborts.</PackageReleaseNotes>
<Description>A micro-library that backports .NET 9.0+'s System.Threading.Lock to prior framework versions (from .NET Framework 3.5 up to .NET 8.0), providing as much backward compatibility as possible.</Description>
<Copyright>© 2024 Mark Cilia Vincenti</Copyright>
<PackageTags>System.Threading.Lock,lock,backport,backward,compatible,compatibility,synchronization,synchronisation</PackageTags>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<AssemblyVersion>2.0.1.0</AssemblyVersion>
<FileVersion>2.0.1.0</FileVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<FileVersion>2.0.0.0</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<IsPackable>true</IsPackable>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down
9 changes: 7 additions & 2 deletions Backport.System.Threading.Lock/PreNet5Lock.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
using System;
#if !NET9_0_OR_GREATER
using System;
using System.Runtime.CompilerServices;
using System.Threading;
#if NET9_0_OR_GREATER
[assembly: TypeForwardedTo(typeof(System.Threading.Lock))]
#endif
namespace Backport.System.Threading;
/// <summary>
/// A backport of .NET 9.0+'s System.Threading.Lock. Provides a way to get mutual exclusion in regions of code between different threads.
Expand Down Expand Up @@ -146,4 +150,5 @@ public ref struct Scope(Lock @lock)
#endif
public readonly void Dispose() => @lock.Exit();
}
}
}
#endif
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There is also no need to reference this library as a dependency for .NET 9.0+. Y

```
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net9.0'))">
<PackageReference Include="Backport.System.Threading.Lock" Version="2.0.1" />
<PackageReference Include="Backport.System.Threading.Lock" Version="2.0.0" />
</ItemGroup>
```

Expand Down

0 comments on commit 252e622

Please sign in to comment.