Change notification chaining

blur chains chrome close up

Photo by Pixabay on

Sometimes you want to define a complex container that aggregates other objects and you would like to chain INotifyPropertyChanged notifications upwards. However, it is difficult to write all the code to wrap up everything needed, and often results in code duplication. So although generally I’m against inheritance in favor of aggregation, this time I think it’s OK to just have a base Changeable class as infrastructure to get the requirements fulfilled faster.

I’ve just shared the code of such a Changeable class on GitHub, packaged as a .NET Standard 1.0 library so you could use it virtually everywhere (i.e. regardless of your target platform), being available there with a small sample app that shows how it can be used. Feel free to improve it further!


About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in .NET, C# and tagged , , , , . Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s