<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.0.0-pre-04" />

Nito.AsyncEx.CancellationTokenTaskSource<T>

public sealed class CancellationTokenTaskSource<T> : IDisposable
Holds the task for a cancellation token, as well as the token registration. The registration is disposed when this instance is disposed.
namespace Nito.AsyncEx { public sealed class CancellationTokenTaskSource<T> : IDisposable { public Task<T> Task { get; } public CancellationTokenTaskSource(CancellationToken cancellationToken); public void Dispose(); } }