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

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.
public Task<T> Task { get; }

Gets the task for the source cancellation token.

Creates a task for the specified cancellation token, registering with the token if necessary.

public void Dispose()

Disposes the cancellation token registration, if any. Note that this may cause Task to never complete.