icsharpcode / NRefactory

NRefactory - Refactoring Your C# Code
684 stars 262 forks source link

Code actions on unknown method are not useful #470

Closed aeschli closed 9 years ago

aeschli commented 9 years ago

'roslyn' branch: For the following code, get code actions on the reference to 'GetByEmailAsync' in Foo. The method exists, but needs arguments.

public class EmployeeRepository
{
  Task<Employee> GetByEmailAsync(string email, PictureType pictureType) { return null; }
}

public class Foo {
  public async Task<Employee> GetLoggedEmployeeInfo(EmployeeRepository rep)
  {
    return await rep.GetByEmailAsync();
   }
}

The proposals contain 'Create field', 'Create property' and 'Create local variable'

mkrueger commented 9 years ago

The create actions were not really done well because roslyn already contains them. These actions got removed.