Skip to main content
๐Ÿ“œ 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:

  1. Published โ€” EventHandler<NotificationEventArgs> raised for every notification with (Id, Channel, Message). Handlers must see args snapshots; raising with no subscribers must not throw.
  2. Filtered โ€” raised when Publish(channel, message, filter) rejects a message; filter is a Predicate<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.