WutheringWaves/KcpSharp/NetstandardShim/CancellationTokenShim.cs

14 lines
346 B
C#
Raw Permalink Normal View History

2024-02-07 21:41:39 +00:00
#if NEED_CANCELLATIONTOKEN_SHIM
namespace System.Threading
{
internal static class CancellationTokenShim
{
public static CancellationTokenRegistration UnsafeRegister(this CancellationToken cancellationToken, Action<object?> callback, object? state)
=> cancellationToken.Register(callback, state);
}
}
#endif