dotnet / dotnet/roslynator

Refactoring Inline Method doesn't appear for async methods

Open
#602 0 comments 0 reactions 0 assignees View on GitHub
Area-Refactorings Feature Request
Dominant language
C#
Stars
3.5k
Forks
294
Avg merge
2h 30m
Merged PRs (30d)
4

Description

**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**:
```csharp
private async Task 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](https://user-images.githubusercontent.com/53271820/65342402-97502700-dbca-11e9-80d5-28597d4114c9.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.