dotnet/roslyn

The "Make method async" refactoring adds "Async" to interface, but doesn't change the return type to Task<>

开放

#40,508 创建于 2019年12月19日

 (1 条评论) (2 个反应) (0 位负责人)C# (4,257 个派生)batch import
Area-IDEBugDeveloper Communityhelp wanted

仓库指标

星标
 (20,414 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

This issue has been moved from a ticket on Developer Community.


I changed a method to use async methods (await . SaveChangesAsync() in Entity Framework). The helpful refactoring offered to make the method async, which it did successfully. It also renamed all occurances of my method appending the suffix Async, which is also great. It also changed the return type of my method to be Task<>, which is also great.

However, it did not change the return type of my interface that the method is implmenting to be Task<>. It clearly did the right thing in renaming the method name in the interface, but just appears to have missed changing the return type. I can obviously make the correction by hand, and I'm much better with the refactoring feature, but it's just falling one step short of being fully helpful.


Original Comments

Visual Studio Feedback System on 11/7/2019, 10:52 PM:

Visual Studio Feedback System on 11/13/2019, 04:37 PM:


Original Solutions

(no solutions)

贡献者指南