CRR0035 - No CancellationToken parameter in the async method

This analyzer detects asynchronous methods that do not accept the CancellationToken parameter.

Task<string> DemoMethodAsync() {
    DoThings();
    return Task.FromResult("Success");
}

All asynchronous methods should accept the CancellationToken parameter and use it to cancel a task if task cancellation was requested. Refer to the Task Cancellation article for more information.

Task<string> DemoMethodAsync(CancellationToken token) {
    token.ThrowIfCancellationRequested();
    DoThings(token);
    return Task.FromResult("Success");
}