Sufficit.Events
1.26.526.2054
dotnet add package Sufficit.Events --version 1.26.526.2054
NuGet\Install-Package Sufficit.Events -Version 1.26.526.2054
<PackageReference Include="Sufficit.Events" Version="1.26.526.2054" />
<PackageVersion Include="Sufficit.Events" Version="1.26.526.2054" />
<PackageReference Include="Sufficit.Events" />
paket add Sufficit.Events --version 1.26.526.2054
#r "nuget: Sufficit.Events, 1.26.526.2054"
#:package Sufficit.Events@1.26.526.2054
#addin nuget:?package=Sufficit.Events&version=1.26.526.2054
#tool nuget:?package=Sufficit.Events&version=1.26.526.2054
<h1> Sufficit.Events <a href="https://github.com/sufficit/sufficit"><img src="https://avatars.githubusercontent.com/u/66928451?s=200&v=4" alt="Sufficit Logo" width="80" align="right"></a> </h1>
📖 About the Project
Sufficit.Events is a lightweight, multi-targeted event bus library designed to provide a simple publish/subscribe in-process event system for Sufficit projects. It supports background processing using System.Threading.Channels, DI-based handler resolution and basic observability via metrics snapshots and System.Diagnostics.Metrics counters.
This library aims to be consumed both by modern .NET applications and legacy codebases that require netstandard2.0 compatibility.
✨ Key Features
- In-process publish/subscribe event bus with background processing (Channels).
- Handler discovery and registration via dependency injection (IServiceCollection extension).
- Thread-safe internal metrics with snapshot DTO (
EventBusStatistics) and Meter/Counters for integration with observability systems. - Multi-target support:
netstandard2.0,net6.0,net7.0,net9.0.
🚀 Getting Started
This is a library intended to be consumed by other projects. Install it as a NuGet package when available or reference the project locally.
📦 NuGet Package
Install via .NET CLI:
dotnet add package Sufficit.Events
Local Project Reference
If you have the source in your solution, prefer using a ProjectReference during development:
<ProjectReference Include="..\sufficit-events\src\Sufficit.Events.csproj" />
🛠️ Usage
Register the event system and your handlers in IServiceCollection:
services.AddEventSystem(typeof(Startup).Assembly);
Create handlers by implementing IEventHandler<TEvent>:
public class MyEventHandler : IEventHandler<MyEvent>
{
public Task HandleAsync(MyEvent evt, CancellationToken cancellationToken)
{
// handle
return Task.CompletedTask;
}
}
Publish events using IEventBus:
await eventBus.PublishAsync(new MyEvent { ... });
Get a snapshot of metrics:
var stats = eventBus.GetStatistics();
📄 License
Distributed under the MIT License. See LICENSE for more information.
🤝 Contributing
Contributions welcome — please follow the fork & pull request workflow and read the Documentation folder for internal guidelines.
📧 Support
Sufficit - development@sufficit.com.br
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Identity.Stores (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Logging (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Options (>= 9.0.16 && < 10.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Threading.Channels (>= 9.0.16 && < 10.0.0)
-
net6.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0 && < 9.0.0)
- Microsoft.Extensions.Identity.Stores (>= 6.0.36 && < 7.0.0)
- Microsoft.Extensions.Logging (>= 6.0.1 && < 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.4 && < 7.0.0)
- Microsoft.Extensions.Options (>= 6.0.1 && < 7.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Threading.Channels (>= 8.0.0 && < 10.0.0)
-
net7.0
- Microsoft.Bcl.AsyncInterfaces (>= 8.0.0 && < 9.0.0)
- Microsoft.Extensions.Identity.Stores (>= 7.0.20 && < 8.0.0)
- Microsoft.Extensions.Logging (>= 7.0.0 && < 8.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1 && < 8.0.0)
- Microsoft.Extensions.Options (>= 7.0.1 && < 8.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Threading.Channels (>= 8.0.0 && < 10.0.0)
-
net9.0
- Microsoft.Bcl.AsyncInterfaces (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Identity.Stores (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Logging (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.16 && < 10.0.0)
- Microsoft.Extensions.Options (>= 9.0.16 && < 10.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Threading.Channels (>= 9.0.16 && < 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.26.526.2054 | 96 | 5/26/2026 |
| 1.26.505.1452 | 93 | 5/5/2026 |
| 1.26.504.1323 | 94 | 5/4/2026 |
| 1.26.419.1946 | 101 | 4/19/2026 |
| 1.26.327.2021 | 144 | 3/27/2026 |
| 1.26.319.1856 | 109 | 3/19/2026 |
| 1.26.314.1945 | 111 | 3/14/2026 |
| 1.26.305.2024 | 109 | 3/5/2026 |
| 1.26.223.1925 | 115 | 2/23/2026 |
| 1.26.221.2227 | 116 | 2/21/2026 |
| 1.26.218.342 | 111 | 2/18/2026 |
| 1.26.210.1937 | 120 | 2/10/2026 |
| 1.26.108.201 | 138 | 1/8/2026 |
| 1.25.930.2112 | 231 | 9/30/2025 |
| 1.25.910.2102 | 224 | 9/10/2025 |
| 1.25.904.1752 | 222 | 9/4/2025 |
| 1.25.828.1304 | 254 | 8/28/2025 |
| 1.25.827.2155 | 266 | 8/27/2025 |
| 1.25.825.1921 | 230 | 8/25/2025 |
| 1.25.824.5 | 163 | 8/24/2025 |