Created
October 3, 2019 15:42
-
-
Save uuklanger/c500df8c332c7403a6d5498751c1e8dd to your computer and use it in GitHub Desktop.
HOWTO - Fake await Calls in async Testing Code to avoid Compiler Warnings for Methods that have Nothing awaitable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Official Microsoft Way | |
await Task.CompletedTask; | |
// Alternate Way | |
await Task.Delay(0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment