Mando 0.3.0

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

Mando

A super lightweight and free alternative to libraries that provide decoupled, in-process communication.

Mando Logo

Build and Test GitHub License GitHub Release NuGet Version NuGet Downloads


Usage

You can use the package directly or fork this repo and create your own, custom implementation.

Installation

The easiest way to add Mando to your project via NuGet.

Features

The features of this library are limited by design, so that the library will be easier to extend if you decide to fork the repo and create a more custom implementation. The core features are, and will always be:

Single command, single handler.

internal sealed MyCustomCommand : ICommand;

internal sealed MyCustomCommandHandler : ICommandHandler<MyCustomCommand>
{
    public Task Execute(MyCustomCommand command)
    {
        // Your magic here!
    }
}

Single command, multiple handlers.

internal sealed MyCustomCommand : ICommand;

internal sealed MyCustomCommandHandlerOne : ICommandHandler<MyCustomCommand>
{
    public Task Execute(MyCustomCommand command)
    {
        // Your magic here!
    }
}

internal sealed MyCustomCommandHandlerTwo : ICommandHandler<MyCustomCommand>
{
    public Task Execute(MyCustomCommand command)
    {
        // And some other magic here!
    }
}

Multiple commands, single handler

internal sealed MyCustomCommandOne : ICommand;
internal sealed MyCustomCommandTwo : ICommand;

internal sealed MyCustomCommandHandler :
    ICommandHandler<MyCustomCommandOne>, ICommandHandler<MyCustomCommandTwo>
{
    public Task Execute(MyCustomCommandOne command)
    {
        // Your magic here!
    }
    
    public Task Execute(MyCustomCommandTwo command)
    {
        // Even more magic here!
    }
}

Dependency Injection

services.AddMando(Assembly.GetExecutingAssembly()))

This registers

  • ICommandHandler<TCommand> : All implementations are registered as Scoped
  • IDispatcher as Scoped

Usage

internal sealed class Application(IDispatcher dispatcher) : IApplication
{
    public Task RunAsync() => dispatcher.Dispatch(new DoSomethingCommand());
}

Checkout Mando.Example for a working example.

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
0.3.0 313 9/17/2025
0.2.0 127 9/6/2025
0.1.2 182 9/1/2025
0.1.1 181 9/1/2025
0.1.0 185 8/31/2025