LevadS 0.5.0-beta

Prefix Reserved
This is a prerelease version of LevadS.
dotnet add package LevadS --version 0.5.0-beta
                    
NuGet\Install-Package LevadS -Version 0.5.0-beta
                    
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="LevadS" Version="0.5.0-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LevadS" Version="0.5.0-beta" />
                    
Directory.Packages.props
<PackageReference Include="LevadS" />
                    
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 LevadS --version 0.5.0-beta
                    
#r "nuget: LevadS, 0.5.0-beta"
                    
#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 LevadS@0.5.0-beta
                    
#: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=LevadS&version=0.5.0-beta&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=LevadS&version=0.5.0-beta&prerelease
                    
Install as a Cake Tool

LevadS: mediator on steroi... topics.

Decouple your logic. Fine-tune your flows.

What is LevadS?

LevadS (pronounced "levadas") is a lightweight mediator library for .NET, designed to facilitate message-based, topic-driven communication within applications. It enables developers to implement the Mediator pattern, promoting loose coupling and separation of concerns by allowing different parts of an application to communicate through messages without direct dependencies.

Topics, concept known from multiple message brokers, are first-class citizens in LevadS. They enable more granular control over message routing and handling. However, they are completely optional and can be used at the developer's discretion.

LevadS comes with minimal dependencies, is designed for easy integration and follows modern patterns (notably Minimal APIs' way of registration).

Supports .NET 8.0+.

Openness as a principle

Everything can be a message / request

Use delegates or classes - it's up to you

Use topics or not - it's up to you

Register manually or automatically - it's up to you

Use Dependency Injection everywhere

Versatility as a goal

Each message is sent with topic and set of headers

Each handler and filter can specify topic pattern to match

Handlers and filters can be generic and support message variance

Filters can be scoped to specific handlers

Autodiscovery of handlers / filters is possible via attributes

Handlers can be registered and disposed at runtime

Four ways to dispatch a message

Send a message to be handled once

Publish a message to be handled by many

Request using message that expects a response

Stream using message that expects a stream of responses

Filtering pipeline

Two stages of processing = two types of filters:

  1. Dispatch filters are to gather context and set up routing

  2. Handling filters are making a separated pipeline to each invoked handler

Filters are useful for routing, logging, validation, caching, transactions, etc.

Exception handlers provide centralized error handling and recovery

Product 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 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
0.5.0-beta 139 11/4/2025