Bsft.EventAggregator 2.2.0

dotnet add package Bsft.EventAggregator --version 2.2.0
                    
NuGet\Install-Package Bsft.EventAggregator -Version 2.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bsft.EventAggregator" Version="2.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bsft.EventAggregator" Version="2.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Bsft.EventAggregator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bsft.EventAggregator --version 2.2.0
                    
#r "nuget: Bsft.EventAggregator, 2.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bsft.EventAggregator@2.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bsft.EventAggregator&version=2.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Bsft.EventAggregator&version=2.2.0
                    
Install as a Cake Tool

Bsft.EventAggregator

An in-process publish/subscribe seam: one IEventAggregator a component publishes to and another subscribes to, without either knowing the other. It is the transport the saga engine, the cache invalidation adapter and the mediator's notification forwarder ride on.

Install

dotnet add package Bsft.EventAggregator

Requires nothing beyond Microsoft.Extensions.DependencyInjection.Abstractions. No further Bsft packages — this is the bottom of that stack, not a consumer of it.

Register

services.AddBsftEventAggregator();

Nothing else is required. SimpleEventAggregator is registered as the singleton IEventAggregator, so publishers and subscribers in the same process see the same instance. Everything that builds on the aggregator — Bsft.EventAggregator.Saga, Bsft.Caching.EventAggregator, Bsft.Mediator.EventAggregator — expects this call to have happened; none of them registers an aggregator of its own.

Configure

Option Default Effect
— — The package has no options type. It is one registration with nothing to tune; delivery is synchronous, in-process and to every subscriber.

Validation: none — there is nothing to configure.

Extend

IEventAggregator is the seam, and the whole package. Replace SimpleEventAggregator by registering your own implementation before calling AddBsftEventAggregator where delivery has to be ordered, buffered, or handed to a scheduler rather than run on the publisher's thread.

A subscription lasts until it is unsubscribed, and the aggregator holds the handler strongly for that whole time. Because it is a singleton, a subscriber that goes out of use without unsubscribing is kept alive by it and keeps being invoked on every later publish. Whoever subscribes owns unsubscribing, and that needs the very delegate that was passed in, so a lambda written inline at the subscribe call is a subscription nobody can remove again. Keep it in a field, or subscribe from a type whose lifetime is the process's anyway.

What the shipped implementation deliberately does not do is cross a process boundary: an event published here reaches this instance and no other. Fanning out to a fleet is Bsft.Messaging's job, and mixing the two up is the mistake this section exists to prevent.

Documentation

Topic page: docs/event-aggregator.md. Conventions: docs/package-conventions.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Bsft.EventAggregator:

Package Downloads
Bsft.EventAggregator.Saga

BSFT Framework saga/flow engine on top of IEventAggregator

Bsft.Localization

BSFT Framework DB-backed localization with tenant support

Bsft.Caching.EventAggregator

BSFT Framework cache invalidation driven by the in-process Bsft.EventAggregator: key and tag invalidation events evict cached query results

Bsft.Mediator.EventAggregator

BSFT Framework bridge that forwards mediator notifications into the in-process Bsft.EventAggregator, so event-aggregator subscribers and sagas react to a notification published through IMediator.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.2.0 218 10/23/2026
2.1.0 247 9/28/2026