Skip to content

CC0122 Replace Task.Result with await Task#820

Open
AmadeusW wants to merge 1 commit into
code-cracker:masterfrom
AmadeusW:resultInAsync
Open

CC0122 Replace Task.Result with await Task#820
AmadeusW wants to merge 1 commit into
code-cracker:masterfrom
AmadeusW:resultInAsync

Conversation

@AmadeusW

Copy link
Copy Markdown

Fixes #734
Supersedes #805
CC0122 Replace Task.Result with await Task

Adds Design Warning CC0122 when System.Threading.Tasks.Task<TResult>.Result is used in async method.
The code fix provider replaces .Result with async

Screenshot of a non trivial case:
cc0122

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.07%) to 91.552% when pulling 9fea23d on AmadeusW:resultInAsync into 794c05a on code-cracker:master.

@giggio giggio self-assigned this Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Task.Result with await Task

3 participants