Lukdrasil.SimpleBus 0.1.6

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Lukdrasil.SimpleBus --version 0.1.6
                    
NuGet\Install-Package Lukdrasil.SimpleBus -Version 0.1.6
                    
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="Lukdrasil.SimpleBus" Version="0.1.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lukdrasil.SimpleBus" Version="0.1.6" />
                    
Directory.Packages.props
<PackageReference Include="Lukdrasil.SimpleBus" />
                    
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 Lukdrasil.SimpleBus --version 0.1.6
                    
#r "nuget: Lukdrasil.SimpleBus, 0.1.6"
                    
#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 Lukdrasil.SimpleBus@0.1.6
                    
#: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=Lukdrasil.SimpleBus&version=0.1.6
                    
Install as a Cake Addin
#tool nuget:?package=Lukdrasil.SimpleBus&version=0.1.6
                    
Install as a Cake Tool

SimpleBus

A simple, type-safe, and asynchronous message bus for .NET 9+.

Project Description

SimpleBus is a library for publishing and subscribing to messages (events) within .NET applications. It leverages .NET Channels for efficient and safe communication between components. The library is designed with simplicity, extensibility, and Dependency Injection support in mind.

Key Features

  • Type-safe API for publish/subscribe
  • Asynchronous message processing
  • Easy integration with .NET Dependency Injection
  • Ability to mask sensitive data in messages
  • Support for custom handlers and middleware (planned)

Basic Usage

  1. Define a message type: public record MyMessage(string Content);
  2. Register SimpleBus in the DI container: services.AddSingleton<ISimpleBus, SimpleBus>(); services.AddSingleton<IEventSender>(sp ⇒ sp.GetRequiredService<ISimpleBus>()); services.AddSingleton<IEventListener>(sp ⇒ sp.GetRequiredService<ISimpleBus>());
  3. Publish and subscribe to messages: var bus = serviceProvider.GetRequiredService<ISimpleBus>(); bus.Publish(new MyMessage("Hello world!"));

bus.Subscribe<MyMessage>(msg ⇒ { Console.WriteLine($"Received: {msg.Content}"); });

Requirements

  • .NET 9.0 or later

Contributing

Contributions are welcome! Please open an issue or pull request as needed.

License

This project is open source under the MIT license.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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