diff options
author | Serghei Cebotari <51533848+schebotar@users.noreply.github.com> | 2021-11-29 17:17:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 17:17:16 +0300 |
commit | f5799a28eaef3f3ea24ba56dc16970d6203b73fd (patch) | |
tree | 9532114d293af3b356630f34f0a57781a75e9939 /CancellationDisposable.cs | |
parent | 5fc6d09f63d843ce65eb4d9fb7cc35df2ea6cc1e (diff) | |
parent | f3b6bfcd3e13519f648c3975d19b8f1d48130059 (diff) |
Merge pull request #2 from schebotar/dev
bDev
Diffstat (limited to 'CancellationDisposable.cs')
-rw-r--r-- | CancellationDisposable.cs | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/CancellationDisposable.cs b/CancellationDisposable.cs deleted file mode 100644 index 700a2c2..0000000 --- a/CancellationDisposable.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Threading; - -namespace Rehau.Sku.Assist -{ - sealed class CancellationDisposable : IDisposable - { - - readonly CancellationTokenSource cts; - public CancellationDisposable(CancellationTokenSource cts) - { - if (cts == null) - { - throw new ArgumentNullException("cts"); - } - - this.cts = cts; - } - - public CancellationDisposable() - : this(new CancellationTokenSource()) - { - } - - public CancellationToken Token - { - get { return cts.Token; } - } - - public void Dispose() - { - cts.Cancel(); - } - } - -} - - |