RequestFlow.Cqrs.Abstractions 1.0.0-preview.5

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

RequestFlow

A small, fast request/handler library for .NET. You define a request and its handler, register them with one call, and dispatch through a single interface. All the wiring happens at runtime, once at startup, with no compiler plugin and no build-time code generation: if a project can reference a NuGet package, it can run RequestFlow.

The core library stays unopinionated about how you name your requests. If you want a type-level split between commands and queries for CQRS- and DDD-style apps, install RequestFlow.Cqrs instead; it already contains the core package.

NuGet Downloads CI License: MIT Status Targets

Status: preview on NuGet. Install with the --prerelease flag:

dotnet add package RequestFlow --prerelease

Why

MediatR went commercial in 2025, and the search for a replacement now turns up a crowded field of free mediators. Many of the fastest are built on source generators: compiler plugins that write the dispatch code during your build. That buys speed and compile-time checks. It also ties the library to your toolchain: a recent compiler, PackageReference, analyzers left on, and generated code in every build.

RequestFlow trades those requirements away and keeps everything at runtime.

  • Errors surface at startup, not in production. Discovery, validation, and the dispatch plan all finish before the first request, and a broken configuration fails the boot with one exception listing every problem. After that, dispatch is one dictionary lookup with no reflection, LINQ, or locking.
  • No build step. Nothing runs inside your compiler, and there is no generated code to step through when something misbehaves. One package behaves the same from .NET 10 down to .NET Framework 4.6.2.
  • MIT, permanently. This library exists because a license changed underneath its users once. It takes no dependency whose license could do the same.
  • Migration is mostly renames. Requests and handlers keep their shape coming from MediatR; the mapping table below covers a typical codebase.

Fast is a claim to prove, not to assert. A BenchmarkDotNet suite against the other mediators, raw artifacts included, is on the roadmap before v1. Until it lands, this README quotes no numbers.

Coming from MediatR

MediatR RequestFlow
IRequest<TResponse>, IRequest same names, RequestFlow namespace
IRequestHandler<TRequest, TResponse> with Handle same interface, method is HandleAsync
IMediator.Send(...) IRequestDispatcher.SendAsync(...)
void requests through Unit void handlers return plain Task, no Unit anywhere
IPipelineBehavior<,> IRequestStage<,>
services.AddMediatR(...) services.AddRequestFlow(...)

What doesn't move yet: notifications (INotification / Publish) and streaming. Both are on the roadmap for after v1.0. Notifications return as events, an in-process publish/subscribe (IEvent, IEventHandler, IEventPublisher); streaming arrives through IAsyncEnumerable<T>. Neither is built today, so if your codebase leans on either, hold the migration until they land.

Packages

  • RequestFlow.Abstractions holds the contracts: IRequest, IRequestHandler, IRequestDispatcher, IRequestStage, NoResult. Depends on nothing.
  • RequestFlow is the runtime: dispatcher, AddRequestFlow with assembly scanning, startup validation. Depends on Abstractions and Microsoft.Extensions.DependencyInjection.Abstractions.
  • RequestFlow.Cqrs.Abstractions holds the CQRS contracts: ICommand, IQuery, their handler interfaces, ICommandDispatcher, IQueryDispatcher. Depends on RequestFlow.Abstractions only.
  • RequestFlow.Cqrs is the CQRS runtime: typed dispatcher implementations, registered with AddRequestFlow(...).AddCqrs(). Depends on the contracts package and the core runtime.

Contracts live in their own packages so your domain layer, and any future add-on package, can reference the interfaces without taking a dependency on a runtime. Install a runtime package at the composition root and the matching contracts arrive transitively. Core types share the RequestFlow namespace; the CQRS types live in RequestFlow.Cqrs.

Documentation

  • Getting started: install, first request and handler, dispatching
  • Registration: every AddRequestFlow option, scanning, generic handlers, startup validation
  • Stages: wrapping handlers, execution order, which requests a stage reaches, filters
  • Service lifetimes: what RequestFlow registers, with which lifetime, and what you can change
  • Exceptions: every exception RequestFlow throws, when it surfaces, and how to fix it

Contributing

Design feedback is the most useful contribution right now.

License

MIT. See LICENSE.

Product 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 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 is compatible.  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 netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on RequestFlow.Cqrs.Abstractions:

Package Downloads
RequestFlow.Cqrs

Opt-in, type-enforced command/query split for RequestFlow: typed dispatcher implementations and AddCqrs registration on top of the RequestFlow runtime. Contracts live in RequestFlow.Cqrs.Abstractions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-preview.5 38 8/7/2026
1.0.0-preview.4 52 8/2/2026
1.0.0-preview.3 52 8/1/2026
1.0.0-preview.2 49 8/1/2026
1.0.0-preview.1 72 7/12/2026