I need to make a instance of some class to provide informations when it's property is being changed. Basically I am trying to implement a binding mechanism, which will watch the properties of the bound class and inform the system that the property has been changed.
The only solution I have found is to:
- Add an event PropertyChanged using Emit
- Get PropertyInfo
- Get SetMethod IntPtr
- Create new SetMethod using Emit which will encapsulate the old method and call the new Event
- Change SetMethod using the new one
Is there any other way? And if not, is there any example how to do this or is there any existing solution?
Thanks for an answer.