<PackageReference Include="System.Reactive" Version="6.0.0-preview.13" />

System.Reactive.Disposables.CancellationDisposable

Represents a disposable resource that has an associated CancellationToken that will be set to the cancellation requested state upon disposal.
namespace System.Reactive.Disposables { public sealed class CancellationDisposable : ICancelable, IDisposable { public CancellationToken Token { get; } public bool IsDisposed { get; } public CancellationDisposable(CancellationTokenSource cts); public CancellationDisposable(); public void Dispose(); } }