mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-15 13:45:09 +00:00
Import SocketIO code
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
||||
namespace SocketIOClient.Extensions
|
||||
{
|
||||
internal static class CancellationTokenSourceExtensions
|
||||
{
|
||||
public static void TryDispose(this CancellationTokenSource cts)
|
||||
{
|
||||
cts?.Dispose();
|
||||
}
|
||||
|
||||
public static void TryCancel(this CancellationTokenSource cts)
|
||||
{
|
||||
cts?.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user