WutheringWaves/KcpSharp/NetstandardShim/CancellationTokenShim.cs
2024-02-08 00:41:39 +03:00

13 lines
346 B
C#

#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