Using IL Weaving to Inject INotifyPropertyChanged into Properties
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.
InfoQ Sep 01, 2015