Simplified INotifyPropertyChanged Implementation with WeakReference Support and Typed Property Access API
I've grown a bit tired of implementing INotifyPropertyChanged. I've tried ways to improve it before (like this "ViewModel" custom tool which even generates strong-typed event accessors).
But my fellow
Clarius
teammate
Mariano
thought it was overkill and didn't like that tool much. He
mentioned
an alternative approach
also, which I didn't like too much because it relied on the
consumer changing his typical interaction with the object
events, but also because it has a substantial design flaw
that causes handlers not to be called at all after a garbage
collection happens. A very simple unit test will showcase
this bug....