roslynator
roslynator copied to clipboard
Refactoring Inline Method doesn't appear for async methods
trafficstars
Product and Version Used: Roslynator 2019 - Version: 2.1.3
Steps to Reproduce:
- Write an async method.
- Call it from inside of another method.
- Try to refactoring by using Inline Method(Cursor is on method and press ctrl+dot )
Example Code:
private async Task<string> GetNewLineAsync() {
...
string s = "Test";
await Task.FromResult(s).ConfigureAwait(false);
...
}
private async Task Test() {
...
string newLine = await GetNewLineAsync().ConfigureAwait(true);
...
}
Actual Behavior:
- "Inline Method" step doesn't appear on menu when I try to refactor line by using Inline Method. It doesn't work for async methods.
Expected Behavior:
- I should use Inline Method for async method like below. https://github.com/JosefPihrt/Roslynator/blob/master/docs/refactorings/RR0062.md
