BT

Using IL Weaving to Inject INotifyPropertyChanged into Properties

| by Jonathan Allen on Feb 14, 2012. Estimated reading time: less than one minute |

Simon Cropp has released an IL weaving tool that wires property changed notifications into automatically implemented properties. IL weaving is a technique in which the IL code in an assembly is rewritten to add functionality. In a broader context this is known as aspect-oriented programming.

An interesting feature of Simon’s Notify Property Weaver is that it doesn’t require attributes or any other form of tagging. Instead it analyzes the code to determine the relationship between normal and calculated properties. These relationships are then used to ensure that all of the appropriate property changed notifications are raised.

Notify Property Weaver runs as an MSBuild task so projects that use it do not need to distribute any additional libraries. It can be configured manually or via a Visual Studio Extension. It supports .Net 3.5+, Silverlight 3+, and Windows Phone 7 and has been released under the MIT License.

Rate this Article

Relevance
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT