NotificationObject -- Why doesn't it have the VerifyProperty?

Topics: Prism v4 - Silverlight 4, Prism v4 - WPF 4
Feb 28, 2011 at 9:19 PM

I've often seen implementations of a NotificationObject or AbstractViewModel or BaseViewModel, all of which implement the INotifyPropertyChanged.

In almost all of these, they have implemented a private method that is only run in the DEBUG mode (tagged with the Conditional("DEBUG") attribute) that notifies the developer that he or she has mistyped a property name. I guess I'm just wondering why this isn't part of the class that ships with Prism?

Mar 1, 2011 at 12:46 AM

Just do it with ILWeaving

http://visualstudiogallery.msdn.microsoft.com/bd351303-db8c-4771-9b22-5e51524fccd3

The u never need to worry about mis-typing a property name

Mar 1, 2011 at 1:34 AM
simoncropp wrote:

Just do it with ILWeaving

http://visualstudiogallery.msdn.microsoft.com/bd351303-db8c-4771-9b22-5e51524fccd3

The u never need to worry about mis-typing a property name

 

As good and useful as extensions/apps such as this and ReSharper are, I honestly would much rather type the code by hand to be accustomed knowing the true code and best-practices (to a certain extent -- I wouldn't go down to the IL level and start coding there).

Mar 1, 2011 at 1:48 AM

This is nothing like resharper.

It does not need any install and can be included as a binary in a tools directory of your solution.

So it will work on a build server with no extra config. Any developer who does a get from source control will have it included and working.

The VSIX is only a UI that helps you with the config settings.

You can set it up manually with no addin http://code.google.com/p/notifypropertyweaver/wiki/Setup

And you do not need know any IL.

Give it a try. I think you will be surprised.

Or read what other people are saying http://code.google.com/p/notifypropertyweaver/wiki/Blogging