Auto Property Plugin

I'm trying to write a plugin to convert an auto property to a property with a backing field
I've got the plugin framework working, and the option showing on auto properties.  My problem is that i have no idea how to replace the existing property with my updated version.



ie
public string Sample {get; set;}

to

private string _sample;
public string Sample
{
     get{return _sample;}
     set
     {
          if(_sample==value) return;
          _sample=value;
          NotifyPropertyChange("Sample");}
}

Please sign in to leave a comment.