The requested page is not available for the requested platform. You are viewing the content for Default platform.

CRR0039 - The 'await' expression without cancellation token

This analyzer detects asynchronous method calls without a valid CancellationToken.

await Task.Run(() => { DemoMethodSync(); }).ConfigureAwait(false);

You should use a CancellationToken object with all asynchronous methods to be able to cancel tasks. Refer to the Task Cancellation article for more information.

await Task.Run(() => { DemoMethodSync(); }, cancellationToken).ConfigureAwait(false);