Encapsulate Field - Implement PropertyChanged
Hello,
I am just tryying to use the refactoring method "Encapsulate Field" but would like to see a PropertyChanged("PropertyName") in the setter.
Is there a way how this could be done?
private string _name;
Ctrl R + E
will change this to
public string Name
{
get
{
return _name;
}
set
{
_name=value;
}
}
but what I would like to see is:
public string Name
{
get
{
return _name;
}
set
{
_name=value;
PropertyChanged("Name");
}
}
The fields are already declared, so I have to use the encapsulate field refactoring.
Thank you for any help
Please sign in to leave a comment.
Hello Marc
This scenario is not supported at the moment, but we will consider it for the future releases. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"