FlowMediator 1.0.0

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

FlowMediator

A lightweight mediator library with pipeline behaviors for .NET 8/9.

Ideal for hobby projects, personal apps, or learning CQRS patterns without the complexity of bigger frameworks.

Provides request/response messaging and pipeline behaviors like logging and validation with minimal setup.

Features

✅ Request/Response messaging (IRequest<TResponse>, IRequestHandler<TRequest,TResponse>)

✅ Pipeline behaviors (IPipelineBehavior<TRequest,TResponse>) for cross-cutting concerns (logging, validation, etc.)

✅ Dependency Injection (DI) ready via IServiceCollection extensions

✅ Manual or automatic pipeline registration

✅ .NET 8 and .NET 9 support

Installation

dotnet add package FlowMediator --version 1.0.0

Example Usage

using FlowMediator.Contracts;
using FlowMediator.Extensions;

// Manual pipeline (you choose order of behaviors)
services.AddFlowMediator(typeof(GetUserByIdQuery).Assembly);
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
services.AddTransient(typeof(IPipelineBehavior<,>), typeof(ValidationBehavior<,>));

// Or automatic pipeline (handlers + behaviors auto registered)
services.AddFlowMediatorWithBehaviors(typeof(GetUserByIdQuery).Assembly);

Use Mediator

var mediator = provider.GetRequiredService<IMediator>();

var user = await mediator.Send(new GetUserByIdQuery(1));
Console.WriteLine(user.Name); // "User 1"

🤝 Contributing

Contributions are welcome! Please fork the repo and create a PR.

📜 License

Licensed under the MIT License. See LICENSE for details.

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 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
1.0.0 173 8/26/2025

Initial 1.0.0 release: core mediator, pipeline behaviors, DI integration.