| TypeName | IncludeCancellationParameterAnalyzer |
| CheckId | IncludeCancellationParameter |
| Category | Usage Rules |
An asynchronous method does not include a CancellationToken parameter.
This diagnostic identifies asynchronous methods which do not include a CancellationToken parameter in their signature.
To fix a violation of this rule, add a CancellationToken parameter to the signature of the method.
[SuppressMessage("AsyncUsage.CSharp.Usage", "IncludeCancellationParameter", Justification = "Reviewed.")]#pragma warning disable IncludeCancellationParameter // Include CancellationToken parameter
public Task<int> ThisMethodCannotBeCancelled()
#pragma warning restore IncludeCancellationParameter // Include CancellationToken parameter
{
return Task.FromResult(0);
}