This project has moved. For the latest updates, please go here.

RaisePropertyChanged improvement

Jan 3, 2014 at 5:58 PM
Hi Laurent

I'm studying your MVVM framework and I'm deriving a custom viewmodel class.
I encountered a little problem with your implementation of RaisePropertyChanged.

In my class I want to attach a bool "dirty" field to the "property changed" event.
Net guidelines tell us to override a raise event method on a base class instead of attaching the event internally because it's safer and faster.
So i did it like this, but... after some little test I noticed that my ovverride was not working when calling the generic method.
Taking a look at you source I noticed that you made two different invocations instead of creating a method chain (and I was overriding only the closed-type method).
Net guidelines suggest to implement override methods in a "complementary" way when possible.
Why don't you simply make a call to the common RaisePropertyChanged(string) from the generic counterpart (after property name resolution)?

Thanks, Lorenzo

PS Same for RaisePropertyChanging!
Jan 3, 2014 at 6:27 PM
Good point. Added to backlog.