Table of Contents

Interface IMediator

Defines the contract for the Mediator pattern. The mediator decouples components (colleagues) by acting as a central hub for communication — instead of referencing each other directly, components send messages through the mediator.

public interface IMediator

Methods

Notify(object, string, object)

Broadcasts an event to all subscribers registered under eventKey.

void Notify(object sender, string eventKey, object data = null)

Parameters

sender object

The object raising the event.

eventKey string

A string identifier for the event channel (e.g. "OnPlayerDied").

data object

Optional payload accompanying the event.