roslynator icon indicating copy to clipboard operation
roslynator copied to clipboard

Refactoring Inline Method doesn't appear for async methods

Open ibrahim-interxion opened this issue 6 years ago • 0 comments
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

image

ibrahim-interxion avatar Sep 20 '19 16:09 ibrahim-interxion