So I have a ton of viewmodels and models in my code that require each property to use the ReactiveUI way of observing their changes:
private bool _myProperty;
public Boolean MyProperty
{
get { return _myProperty; }
set { this.RaiseAndSetIfChanged(ref _myProperty, value); }
}
Using Resharper I can convert this:
public Boolean MyProperty { get; set; }
Into this:
private bool _myProperty;
public Boolean MyProperty
{
get { return _myProperty; }
set { _myProperty = value; }
}
Then I have to manually convert it into the first code snippet above to get my ReactiveUI functionality incorporated.
What I'm trying to figure out is if there is a way to write a custom refactoring for Resharper that will allow me to add a 'Convert to Reactive Property' shortcut to the tool menu that appears when the cursor is on top of a simple property member? (on top of the already existing 'Convert to auto-property' and 'Convert to property with change notification' options already there.
Any help is greatly appreciated! This would save me a TON of time when coding...