A simple and thread-safe event aggregator for .NET 8 applications, allowing for decoupled communication between different parts of your application through event subscription and publishing.
- Thread-safe event subscription and publishing.
- Easy subscription and unsubscription using the
SubScription
class. - Supports any event type through generics.
- .NET 8 SDK
Clone the repository:
bash git clone https://github.com/your-username/EventAggregator.git
EventAggregator eventAggregator = new();
using SubScription sub = eventAggregator.Subscribe((x) => Info(x));
eventAggregator.Publish(new Message("Test"));
static void Info(Message message) { Console.WriteLine($"Event Received : {message.Data}"); } }