Baubit.Aggregation
2025.23.1
Baubit.Aggregation was foundational in helping me understand optimal patterns required to implement the Aggregator pattern. Baubit.Mediation has all of those learnings applied, making it not just more reliable but also more performant.
dotnet add package Baubit.Aggregation --version 2025.23.1
NuGet\Install-Package Baubit.Aggregation -Version 2025.23.1
<PackageReference Include="Baubit.Aggregation" Version="2025.23.1" />
<PackageVersion Include="Baubit.Aggregation" Version="2025.23.1" />
<PackageReference Include="Baubit.Aggregation" />
paket add Baubit.Aggregation --version 2025.23.1
#r "nuget: Baubit.Aggregation, 2025.23.1"
#:package Baubit.Aggregation@2025.23.1
#addin nuget:?package=Baubit.Aggregation&version=2025.23.1
#tool nuget:?package=Baubit.Aggregation&version=2025.23.1
A simple event aggregator that supports <a href="https://www.google.com/search?q=asynchronous+event+buffering" target="_blank" rel="noopener noreferrer">asynchronous event buffering</a>. Provides a <a href="https://github.com/pnagoorkar/Baubit" target="_blank" rel="noopener noreferrer">Baubit</a> module
Get Started
Unbounded event aggregator<br> myConfig.json
{
"modules": [
{
"type": "Baubit.Aggregation.DI.Unbounded.Module`1[[MyLib.TestEvent, MyLib]], Baubit.Aggregation",
"configuration": {
}
}
]
}
Bounded event aggregator<br> myConfig.json
{
"modules": [
{
"type": "Baubit.Aggregation.DI.Bounded.Module`1[[MyLib.TestEvent, MyLib]], Baubit.Aggregation",
"configuration": {
"Capacity": 10,
"FullMode": 0,
"MaxWaitToWriteMS": 10
}
}
]
}
MyEventGenerator.cs
public class MyEventGenerator
{
private IEventAggregator<TestEvent> _eventAggregator;
public MyEventGenerator(IEventAggregator<TestEvent> eventAggregator)
{
_eventAggregator = eventAggregator
}
public void DoSomething()
{
//_eventAggregator.TryPublishAsync(...);
}
}
MyEventObserver.cs
public class MyEventObserver : IObserver<TestEvent>
{
private IDisposable subscription;
public EventConsumer(IObservable<TestEvent> observable)
{
subscription = observable?.TrySubscribeAsync(this).GetAwaiter().GetResult().Value;
}
public void OnCompleted()
{
}
public void OnError(Exception error)
{
}
public virtual void OnNext(TestEvent next)
{
// handle next event
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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 was computed. 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. |
-
net9.0
- Baubit (>= 2025.23.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.