ivanpaulovich/FluentMediator
50.2
Adequate · 7 November 2026
1.8k
lines of production code
C#
primary language
7
measurements over time
What this system is
FluentMediator is a .NET library that implements a loosely coupled mediator pattern with support for synchronous, asynchronous, and cancellable message handling. It utilizes a configurable pipeline architecture that allows users to define and route messages through distinct named or typed processing chains. The system integrates with Microsoft.Extensions.DependencyInjection to manage service lifetimes and includes validation logic to ensure pipeline configuration integrity.
Features
Add AspNetCore sample application
A new AspNetCore sample has been added to the repository, demonstrating a customer registration feature built with ASP.NET Core. The sample includes a solution file, Visual Studio Code launch and task configurations, and a WebApi project that exposes a POST endpoint for registering customers. It implements a core domain model with a Register use case and an in-memory customer repository, wired together via dependency injection and the FluentMediator library for command handling. Unit tests are also included to verify the registration logic.
samples, samples/AspNetCore · high confidence
Add support for Scoped and Singleton mediator lifetimes
The FluentMediator integration with Microsoft.Extensions.DependencyInjection now offers explicit methods to register the mediator with different service lifetimes. In addition to the existing transient registration, users can now call AddScopedFluentMediator or AddSingletonFluentMediator to control the lifecycle of the pipeline provider and mediator instance, allowing for scoped or singleton behavior in their application architecture.
src/FluentMediator.Microsoft.Extensions.DependencyInjection · high confidence
Initial release of FluentMediator with Azure Pipelines CI/CD
This change introduces the initial version of the FluentMediator library, a loosely coupled mediator for .NET that supports async methods, cancellation tokens, and named pipelines. It includes the core library, a Microsoft.Extensions.DependencyInjection integration package, and unit tests. The repository is configured with Azure Pipelines to automatically build, test, and publish NuGet packages on tag creation, alongside standard project scaffolding like .editorconfig and contributor tracking.
(repo-wide) · high confidence
Introduction of named pipeline support and builder API
The library now supports named pipelines, allowing users to define and select specific processing chains by name rather than relying solely on type-based resolution. This change introduces a new builder API (\IPipelineBuilder\, \PipelineBuilder\) for constructing these pipelines, along with interfaces like \ISyncMediator\ and \ISyncPipelineProvider\ that expose \Send\ and \Publish\ methods accepting an optional \pipelineName\ parameter. The internal pipeline execution model has been refactored to support this, including a \Direct\ handler for return values and a \Pipeline\ class that manages method collections and named identity.
src/FluentMediator/Pipelines/Pipeline · high confidence
Introduction of named pipeline support and pipeline configuration validation
The pipeline system now supports named pipelines, allowing users to identify and retrieve pipelines by a unique string name in addition to the existing type-based lookup. This change introduces a new \INamedPipeline\ interface and updates the \PipelineCollection\ to maintain separate registries for typed and named pipelines. To ensure configuration integrity, the system now throws a \PipelineAlreadyExistsException\ if a duplicate name or type is registered, and a \PipelineNotFoundException\ if a requested pipeline cannot be found. Additionally, a \ReturnFunctionIsNullException\ is available to handle cases where a pipeline's return function is not defined.
src/FluentMediator/Pipelines · high confidence
Behavioural changes
Introduction of a Pipeline-based Mediator with Named Pipeline Support
The FluentMediator library has been refactored to use a pipeline architecture, allowing users to define and execute message handlers through configurable pipelines. This change introduces support for named pipelines, enabling users to route specific message types to distinct handler chains via an optional \pipelineName\ parameter on \Send\ and \Publish\ methods. The mediator now supports synchronous, asynchronous, and cancellable execution modes, each with its own pipeline provider and builder. Additionally, a \PipelineNotFound\ event is exposed to handle cases where a specified pipeline does not exist, and null request validation has been added to throw \NullRequestException\ when null messages are passed.
src/FluentMediator · high confidence
Test coverage
Added unit test infrastructure for PingPong handler; Added unit tests for mediator pipeline configuration and execution.
Dependencies
Added AspNetCore sample project and updated test dependencies
This change introduces a new AspNetCore sample application (located in samples/AspNetCore) demonstrating the library with .NET Core 3.0, alongside a SimpleConsoleApp sample. It also updates the main UnitTests project to use xUnit 2.4.1, Moq 4.13.1, and Microsoft.NET.Test.Sdk 16.4.0, while the AspNetCore UnitTests sample references Microsoft.Extensions.DependencyInjection 3.0.0.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 50 → 50 (+0.2)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 85 → 87 (+2.4)
- Architecture 77 → 77 (+0.0)
- Maturity 40 → 40 (+0.0)
- Readiness 57 → 58 (+1.2)
- Security 54 → 54 (+0.0)
- Performance 60 → 60 (+0.0)
Resolved (17)
- Conflicting configuration patterns. On<TRequest>() suggests a fluent, type-safe builder pattern for defining behavior, while Add(...) takes pre-constructed builder interfaces. It is unclear if these are mutually exclusive, complementary, or if On is just a helper for Add. The naming On vs Add is ambiguous regarding intent (subscription vs registration).
- End-of-life runtime: .NET netcoreapp2.2 (test/UnitTests/UnitTests.csproj)
- End-of-life runtime: .NET netcoreapp3.0 (samples/AspNetCore/test/UnitTests/UnitTests.csproj)
- Inconsistent builder registration methods. The main IPipelineProviderBuilder has an On<TRequest>() method, but the specific context builders (Sync, Async, Cancellable) all use Add(...). This suggests a fragmented API where the root builder behaves differently from the specialized builders.
- Inconsistent naming for pipeline retrieval. The sync provider uses GetPipeline, the async provider uses GetAsyncPipeline, and the cancellable provider uses GetCancellablePipeline. This creates three different verbs for the same logical operation (retrieving a pipeline instance), increasing cognitive load.
- Inconsistent parameter ordering for async methods. The overload with CancellationToken places it before the optional pipelineName, while the simpler async overload places pipelineName before the implicit default cancellation. This forces users to remember specific overloads or use named arguments, breaking the standard .NET convention where CancellationToken is typically the last parameter.
- Low XML-doc coverage: Core (samples/AspNetCore/src/Core/Core.csproj)
- Low XML-doc coverage: Infrastructure (samples/AspNetCore/src/Infrastructure/Infrastructure.csproj)
- Low XML-doc coverage: PingPong (samples/SimpleConsoleApp/PingPong/PingPong.csproj)
- Low XML-doc coverage: WebApi (samples/AspNetCore/src/WebApi/WebApi.csproj)
- The PingHandler class contains multiple handler methods with inconsistent and non-descriptive naming conventions. 'MyMethodAsync', 'MyLongMethod', 'MyCustomBarMethod', 'MyCustomFooMethod', 'MyCustomFooBarAsync', and 'MyCancellableForAsync' do not follow a consistent pattern (e.g., verb-based or noun-based) and use generic prefixes like 'My' or 'Custom' which obscure the actual behavior or request type they handle. This makes it difficult to distinguish between handlers for different requests or behaviors.
- Vulnerable: Microsoft.AspNetCore.App
- Vulnerable: Microsoft.NETCore.App
- XML-doc coverage: FluentMediator (src/FluentMediator/FluentMediator.csproj)
- XML-doc coverage: FluentMediator.Microsoft.Extensions.DependencyInjection (src/FluentMediator.Microsoft.Extensions.DependencyInjection/FluentMediator.Microsoft.Extensions.DependencyInjection.csproj)
- redundant comment (samples/AspNetCore/test/UnitTests/UseCasesTests/RegisterTests.cs)
- redundant comment (test/UnitTests/MyCustomMediator.cs)
New (4)
- End-of-life runtime: .NET netcoreapp2.2 (samples/SimpleConsoleApp/PingPong/PingPong.csproj)
- End-of-life runtime: .NET netcoreapp2.2 (test/UnitTests/UnitTests.csproj)
- End-of-life runtime: .NET netcoreapp3.0 (samples/AspNetCore/src/WebApi/WebApi.csproj)
- End-of-life runtime: .NET netcoreapp3.0 (samples/AspNetCore/test/UnitTests/UnitTests.csproj)
API surface
- Unchanged — 1 HTTP endpoints
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
ivanpaulovich/FluentMediator was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 7 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 6f1c0a53d332020e304b61692380636e5136eedf — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.