如何列出在解决方案中缺少Task
调用的所有Task<T>
- 或await
- 返回方法调用?
我尝试在Google上搜索一些内容,但没有弹出任何内容。
例如:
public Task<bool> DoWork()
{
return Task.FromResult(true); // would be listed, even though it's "correct"
}
public async Task DoMoreWork()
{
await DoWork(); // would not be listed
DoWork(); // would be listed
DoWork(); // would be listed a second time in this same method
}
public void DoEvenMoreWork()
{
DoWork(); // would be listed
}
我们正在使用.NET Framework 4.5。