Inject ICancellationUtil where you wish to set the CancellationToken (typically from an API Controller)
_cancellationUtil.Set(cancellationToken);
Inject ICancellationUtil where you wish to retrieve the CancellationToken (typically when accessing another API, or database etc):
// is not guaranteed to be non-null (if it never was set within scope), but is specified thus for ease of usevarcancellationUtil= _cancellationUtil.Get();