Observer
Goal
A subject object, maintains a list of its dependents, called observers, and notifies them automatically of any state changes.
UML
C#
2 alternatives (More information here):
- Using interfaces like
IObserver
andIObservable
and make interface calls - Use an event in the subject and delegates. Observers register on this event.
The second option is completely integrated in the .NET CLR.