๐ WAYPOINT LESSON
Checkpoint โ Event-Driven Notification System
โญโญ intermediateโณ 22 min read๐ Lesson 100 of 265
Build a publish/subscribe notification system with typed events, ordering, and clean unsubscribes.
The gate (mini-build)
A NotificationCenter with two events:
PublishedโEventHandler<NotificationEventArgs>raised for every notification with (Id, Channel, Message). Handlers must see args snapshots; raising with no subscribers must not throw.Filteredโ raised whenPublish(channel, message, filter)rejects a message;filteris aPredicate<string>the caller supplies per call.
Plus: UnsubscribeAll() clears both lists so a disposed center releases its
subscribers. The graded test registers handlers, publishes through a filter,
unsubscribes, and asserts the full observable behavior โ order included.