Renaming property doesn't pick up INotifyPropertyChanged parameter anymore

Hi there

Assume you'd rename the property below, RS 3.1 would also suggest to rename
the string as well. This is broken in 4.0, and might cause WPF devs quite
some headaches if their property notification system gets broken:


public int? UserId
{
get { return userId; }
set
{
//ignore if values are equal
if (value == userId) return;

userId = value;
OnPropertyChanged("UserId");
}
}

Cheers,
Philipp

2 comments
Comment actions Permalink

Hello Philipp,

Do you have checkbox "Search in string literals and comments" enabled in
Rename dialog?

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


PS> Hi there
PS>
PS> Assume you'd rename the property below, RS 3.1 would also suggest to
PS> rename the string as well. This is broken in 4.0, and might cause
PS> WPF devs quite some headaches if their property notification system
PS> gets broken:
PS>
PS> public int? UserId
PS> {
PS> get { return userId; }
PS> set
PS> {
PS> //ignore if values are equal
PS> if (value == userId) return;
PS> userId = value;
PS> OnPropertyChanged("UserId");
PS> }
PS> }
PS> Cheers,
PS> Philipp


0
Comment actions Permalink

Do you have checkbox "Search in string literals and comments" enabled in
Rename dialog?


Yes. RS suggests to rename the region that surrounds my property, but not
the string within.




>

Sincerely,
Ilya Ryzhenkov

>

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

>
>

PS> Hi there
PS> PS> Assume you'd rename the property below, RS 3.1 would also suggest
to
PS> rename the string as well. This is broken in 4.0, and might cause
PS> WPF devs quite some headaches if their property notification system
PS> gets broken:
PS> PS> public int? UserId
PS> {
PS> get { return userId; }
PS> set
PS> {
PS> //ignore if values are equal
PS> if (value == userId) return;
PS> userId = value;
PS> OnPropertyChanged("UserId");
PS> }
PS> }
PS> Cheers,
PS> Philipp

>


0

Please sign in to leave a comment.