Skip to content

Refactor create property #223

Open
Open
@jamlen

Description

@jamlen

I'm on day one of using OmniSharp but once I got it running in Spacemacs (via omnisharp-emacs), the result of a refactor (omnisharp-run-code-action-refactoring) was not what I was expecting.

Given this:

public class MyType
{
  public string Name { get; set; }
}

var a = new MyType
  {
    Name = "Talula",
    NewField = 1234  // <- Refactor create property
  };

I was expecting:

public class MyType
{
  public string Name { get; set; }
  int NewField { get; set; }
}


var a = new MyType
  {
    Name = "Talula",
    NewField = 1234
  };

But what I got was:

public class MyType
{
  public string Name { get; set; }
}

int NewField
{
  get; 
  set;
}

var a = new MyType
  {
    Name = "Talula",
    NewField = 1234
  };

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions