-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae7896f
commit 51e9342
Showing
3 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
using FrameworkNamespace = System.Threading; | ||
|
||
namespace Backport.System.Threading | ||
{ | ||
namespace Backport.System.Threading; | ||
|
||
#if NET9_0_OR_GREATER | ||
/// <summary> | ||
/// Represents a factory class for backporting .NET 9.0's System.Threading.Lock to prior framework versions. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use <see cref="FrameworkNamespace.Lock"/>. | ||
/// </summary> | ||
public static class LockFactory | ||
{ | ||
/// <summary> | ||
/// Represents a factory class for backporting .NET 9.0's System.Threading.Lock to prior framework versions. | ||
/// Creates a new instance of <see cref="FrameworkNamespace.Lock"/>. On frameworks prior to .NET 9.0, a different backported class is returned. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use <see cref="FrameworkNamespace.Lock"/>. | ||
/// </summary> | ||
public static class LockFactory | ||
{ | ||
/// <summary> | ||
/// Creates a new instance of <see cref="FrameworkNamespace.Lock"/>. On frameworks prior to .NET 9.0, a different backported class is returned. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use <see cref="FrameworkNamespace.Lock"/>. | ||
/// </summary> | ||
/// <returns>An instance of <see cref="FrameworkNamespace.Lock"/>.</returns> | ||
public static FrameworkNamespace.Lock Create() => new(); | ||
} | ||
/// <returns>An instance of <see cref="FrameworkNamespace.Lock"/>.</returns> | ||
public static FrameworkNamespace.Lock Create() => new(); | ||
} | ||
#else | ||
/// <summary> | ||
/// Represents a factory class for backporting .NET 9.0's System.Threading.Lock to prior framework versions. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use System.Threading.Lock. | ||
/// </summary> | ||
public static class LockFactory | ||
{ | ||
/// <summary> | ||
/// Represents a factory class for backporting .NET 9.0's System.Threading.Lock to prior framework versions. | ||
/// Creates a new instance of <see cref="Lock"/>. On .NET 9.0 or later, an instance of System.Threading.Lock is returned. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use System.Threading.Lock. | ||
/// </summary> | ||
public static class LockFactory | ||
{ | ||
/// <summary> | ||
/// Creates a new instance of <see cref="Lock"/>. On .NET 9.0 or later, an instance of System.Threading.Lock is returned. | ||
/// If your project does not target anything before .NET 5.0, you do not need to use this; simply use System.Threading.Lock. | ||
/// </summary> | ||
/// <returns>An instance of <see cref="Lock"/>.</returns> | ||
public static Lock Create() => new(); | ||
} | ||
#endif | ||
/// <returns>An instance of <see cref="Lock"/>.</returns> | ||
public static Lock Create() => new(); | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters