Event Aggregator
Namespace: DesignPatterns.Behavioral
Overview
In-process pub/sub decoupling publishers from subscribers. No source generator — pure runtime API.
Runtime
IEventAggregator—Publish,Subscribe,UnsubscribeIEventHandler<TEvent>— typed handler- Default implementation: thread-safe in-memory aggregator
csharp
var aggregator = new EventAggregator();
aggregator.Subscribe<OrderPlaced>(new EmailHandler());
aggregator.Publish(new OrderPlaced(orderId, total));Sample
DesignPatterns.Samples.EventAggregator
Maintainer doc: docs/EventAggregator.md (中文).