This is a migrated thread and some comments may be shown as answers.

"Convert to property with backing field" does not recognize Code style settings

1 Answer 47 Views
Refactorings
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matthias Bibo
Top achievements
Rank 1
Matthias Bibo asked on 17 Jul 2012, 10:40 AM

Hello,

the JC function "Convert to property with backing field" is really good and I use it quite often,

but it does not recognize the Code style settings "Use 'this' qualifier....".

This is annoying, because we check our code with stylecop and want a this qualifier where it has to be.

So I enabled it in the settings, but the setting is ignored.

PS: Another feature suggestion for this function.

I mostly need to convert the Property to a property with backing field when a property changed notification is required and I have to add it manually. Perhaps the function could be improved in this way (by an option) that when the class implement INotifyPropertyChanged, a code piece like this

if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs("<propertyName>"));
            }

is added to the property, or the property modification could be based on a code/snippet from Visual Studio.

Best Regards,

Matthias

1 Answer, 1 is accepted

Sort by
0
Ivan
Telerik team
answered on 17 Jul 2012, 11:26 AM
Hi,

Thank you for your feedback. I reviewed it and was able to reproduce your issue. It's already fixed and the fix will most probably be included after our SP release.
As for your feature request - we will consider implementing it.
Thank you for your help!

Greetings,
Ivan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Refactorings
Asked by
Matthias Bibo
Top achievements
Rank 1
Answers by
Ivan
Telerik team
Share this question
or