Klab.Toolkit.Event
2.6.0
See the version list below for details.
dotnet add package Klab.Toolkit.Event --version 2.6.0
NuGet\Install-Package Klab.Toolkit.Event -Version 2.6.0
<PackageReference Include="Klab.Toolkit.Event" Version="2.6.0" />
<PackageVersion Include="Klab.Toolkit.Event" Version="2.6.0" />
<PackageReference Include="Klab.Toolkit.Event" />
paket add Klab.Toolkit.Event --version 2.6.0
#r "nuget: Klab.Toolkit.Event, 2.6.0"
#:package Klab.Toolkit.Event@2.6.0
#addin nuget:?package=Klab.Toolkit.Event&version=2.6.0
#tool nuget:?package=Klab.Toolkit.Event&version=2.6.0
Klab.Toolkit.Event
Overview
The Klab.Toolkit.Event
package is a core component of the Klab.Toolkit solution. It provides a robust and flexible event handling system that allows different parts of the application to communicate with each other through events. This package aims to promote decoupling and modularity by enabling event-driven architecture.
Purpose
The primary purpose of the Klab.Toolkit.Event
package is to facilitate event-driven communication within the application. By using this package, different components can publish and subscribe to events without needing to know about each other, thus promoting loose coupling and enhancing maintainability.
Key Features
- Changebale Event Message Queue: The event message queue can be changed to any other implementation that implements the
IEventQueue
interface. - Event Subscription: To subscribe to an event, you can use the
EventBus.Subscribe
method, passing in the event type and a callback function or register a handler class that implements theIEventHandler
interface. - Send Requests: The EventBus also provides a
Send
method that allows you to send an request to a handler and get a response back (like MediatR). - Default an In-Memory Event Queue: The default implementation of the event queue is an in-memory queue that stores events in memory. This implementation is suitable for most applications, but you can replace it with a custom implementation if needed.
- Save the event history to a defined file. See the
EventModuleConfiguration.EventLogFilePath
property.
Example Usage
See the test project Klab.Toolkit.Event.Tests
.
Tipps
Forbid to log sensitive data of a event
Each event will be logged as a json string.
If you want to forbid to log sensitive data of a event you can add the attribute JsonIgnore
to the property.
Example: MyEvent
will be logged without the property Password
.
public class MyEvent : IEvent
{
public string Name { get; set; }
[JsonIgnore]
public string Password { get; set; }
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 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 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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- Klab.Toolkit.Event.Abstractions (>= 2.6.0)
- Klab.Toolkit.Results (>= 2.6.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.2)
- Microsoft.Extensions.Hosting (>= 9.0.2)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.2)
- System.Text.Json (>= 9.0.2)
- System.Threading.Channels (>= 9.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Klab.Toolkit.Event:
Package | Downloads |
---|---|
Klab.Toolkit.Event.InMemory
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.10.0 | 161 | 8/22/2025 |
2.9.0 | 179 | 8/3/2025 |
2.8.2 | 346 | 5/15/2025 |
2.8.1 | 172 | 4/24/2025 |
2.8.0 | 158 | 4/22/2025 |
2.7.3 | 129 | 4/13/2025 |
2.7.2 | 165 | 4/6/2025 |
2.7.1 | 170 | 4/3/2025 |
2.7.0 | 164 | 4/3/2025 |
2.6.0 | 672 | 3/24/2025 |
2.5.1 | 133 | 3/14/2025 |
2.5.0 | 105 | 2/24/2025 |
2.4.1 | 138 | 10/2/2024 |
2.4.0 | 115 | 10/2/2024 |
2.3.0 | 129 | 10/1/2024 |
2.2.4 | 126 | 9/30/2024 |
2.2.3 | 110 | 9/28/2024 |
2.2.2 | 178 | 9/20/2024 |
2.2.1 | 167 | 9/17/2024 |
2.2.0 | 166 | 9/17/2024 |
2.1.0 | 187 | 8/12/2024 |