Skip to content

Support nameof keyword #52

@maca88

Description

@maca88

The following example:

public class TestCase
{
  [DefaultValue(nameof(Write))]
  public void Write()
  {
    SimpleFile.Write(nameof(DoSomething));
  }

  private void DoSomething()
  {
  }
}

when transfromed into a new type should generate:

public class TestCaseAsync
{
  [DefaultValue(nameof(WriteAsync))]
  public Task WriteAsync()
  {
    return SimpleFile.WriteAsync(nameof(DoSomething));
  }

  private void DoSomething()
  {
  }
}

where nameof(Write) should be converted to nameof(WriteAsync) and DoSomething must be copied as it is referenced by the argument of WriteAsync method

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions