-
Notifications
You must be signed in to change notification settings - Fork 12
Redundant Captured Context
Michael Damatov edited this page Nov 15, 2018
·
3 revisions
Analyzes whether adding .ConfigureAwait(false) is recommended.
Highlights the await keyword, if all following conditions are true:
- the awaited expression is the last expression in the method (local functions declared at the end of the method do not count as last) or the awaited expression is returned by the
returnstatement -
ConfigureAwait(...)is not applied to the awaited expression
- methods
- lambda expressions
- anonymous methods
- local functions
💡 The context action is always available to add the ConfigureAwait(false) expression.
💡 The analyzer can be deactivated in the ReSharper Options dialog.