Bsft.Mediator.EventAggregator
2.2.0
dotnet add package Bsft.Mediator.EventAggregator --version 2.2.0
NuGet\Install-Package Bsft.Mediator.EventAggregator -Version 2.2.0
<PackageReference Include="Bsft.Mediator.EventAggregator" Version="2.2.0" />
<PackageVersion Include="Bsft.Mediator.EventAggregator" Version="2.2.0" />
<PackageReference Include="Bsft.Mediator.EventAggregator" />
paket add Bsft.Mediator.EventAggregator --version 2.2.0
#r "nuget: Bsft.Mediator.EventAggregator, 2.2.0"
#:package Bsft.Mediator.EventAggregator@2.2.0
#addin nuget:?package=Bsft.Mediator.EventAggregator&version=2.2.0
#tool nuget:?package=Bsft.Mediator.EventAggregator&version=2.2.0
Bsft.Mediator.EventAggregator
The adapter between the Bsft.Mediator and Bsft.EventAggregator families: an
INotificationForwarder that republishes every mediator notification onto the in-process event
aggregator, so a saga or a cache subscriber can react to it without knowing the mediator exists.
Install
dotnet add package Bsft.Mediator.EventAggregator
Requires Bsft.Mediator.Abstractions and Bsft.EventAggregator. It supplies neither a mediator nor an
aggregator: both families must already be registered.
Register
services.AddBsftEventAggregator();
services.AddBsftMediator(mediator =>
{
mediator.RegisterServicesFromAssembly(typeof(Program).Assembly);
mediator.ForwardNotifications();
});
services.AddBsftMediatorEventAggregator();
Both halves are required and neither is enough on its own: ForwardNotifications() tells the mediator to
call an INotificationForwarder, and AddBsftMediatorEventAggregator is what supplies one. Without the
first, this package is registered and never called; without the second, the mediator has nothing to
forward to.
Configure
| Option | Default | Effect |
|---|---|---|
| — | — | No options type. What is forwarded is every notification the mediator publishes, and where it goes is decided by the registered IEventAggregator. |
Validation: none — there is nothing to configure.
Extend
INotificationForwarder is the seam, declared in Bsft.Mediator.Abstractions; this package is one
implementation of it. Register your own instead to forward onto something else — a message bus, an
outbox — and note that forwarding is in addition to normal handler dispatch, not instead of it.
The aggregator is in-process, so a forwarded notification reaches this instance and no other. Crossing a
process boundary is Bsft.Messaging's job.
Documentation
Topic page: docs/mediator.md. Conventions: docs/package-conventions.md.
| Product | Versions 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. |
-
net10.0
- Bsft.EventAggregator (>= 2.2.0)
- Bsft.Mediator.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.12)
-
net8.0
- Bsft.EventAggregator (>= 2.2.0)
- Bsft.Mediator.Abstractions (>= 2.2.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.19)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.