Area-AnalyzersConcept-Continuous Improvementhelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Discussed in https://github.com/dotnet/roslyn/discussions/60285
Originally posted by TonyValenti March 20, 2022 Today, if you have a method like this:
public Task FooAsync() {
return Task.Completed;
}
and you type "await " in the body of the method, the signature of the method automatically changes to include "async" so that it reads as so:
public async Task FooAsync() { // Notice that async was added.
await //this is where I was typing
return Task.CompletedTask;
}
This is great but it would be even better if a few other changes would happen:
- Change any "return Task.CompletedTask" to just "Return" (or, perhaps, omit it completely depending on location)
- Change any "Task.FromResult(x)" to just x