Simplified INotifyPropertyChanged Implementation with WeakReference Support and Typed Property Acces
Posted
by Daniel Cazzulino
on ASP.net Weblogs
See other posts from ASP.net Weblogs
or by Daniel Cazzulino
Published on Mon, 08 Mar 2010 18:30:36 GMT
Indexed on
2010/03/08
18:38 UTC
Read the original article
Hit count: 544
.NET
|All Technology
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....
© ASP.net Weblogs or respective owner