Skip to content
CAI
Software that uses CAICheck a score

dzmprt/MitMediator

54.9

Adequate · 21 September 2026

2.9k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

MitMediator is a high-performance, allocation-free mediator library for .NET 10 that implements the MediatR pattern for handling commands, queries, and notifications. It supports streaming requests, pipeline behaviors for middleware-like processing, and parallel notification publishing. The system provides dependency injection integration and maintains compatibility with MediatR's API conventions.

Features

Add sample application for managing books, authors, and genres

The BooksWebApi sample project now includes a complete implementation for managing books, authors, and genres. This includes domain models for Author, Book, and Genre, along with a full set of commands and queries for creating, updating, deleting, and retrieving these entities. The sample demonstrates the use of a validation behavior for request handling and provides dependency injection setup for the application services.

samples · high confidence

Added benchmark suite comparing MitMediator against MediatR

Added a new set of performance benchmarks in the benchmarks/Benchmarks directory that compare the performance of MitMediator against MediatR. The suite includes tests for sending commands with results, void results, and stream results, as well as publishing notifications. Each benchmark file sets up both MediatR and MitMediator mediators and runs performance tests on operations such as Send, Publish, and stream handling, including scenarios with pipeline behaviors.

benchmarks/Benchmarks · high confidence

Added benchmarking scenarios for the MitMediator library

Added new benchmark files for the MitMediator library, including handlers for ping, void, and notification scenarios, as well as stream request handling and pipeline behaviors. These additions allow for performance testing of the library's core features.

benchmarks/Benchmarks/Mit · high confidence

Initial release of MitMediator v10.0.0 for .NET 10

The MitMediator library is introduced as a high-performance, allocation-free mediator for .NET 10, supporting ValueTask-based handlers, pipeline behaviors, and MediatR-style semantics. The release includes a new solution structure with dedicated folders for benchmarks, samples (including a NativeAOT console app), and tests, alongside updated documentation and a global.json file pinning the .NET 10 SDK.

(repo-wide) · high confidence

Introduce Mediator pattern with pipeline behaviors and streaming support

The library now provides a full Mediator implementation featuring request/response handling, notification publishing (including parallel execution), and streaming request support. Users can register handlers via the new \DependencyInjection\ extension methods, which automatically scan assemblies for \IRequestHandler\, \IStreamRequestHandler\, and \INotificationHandler\ implementations. The core \IMediator\ interface exposes \Send\, \SendAsync\, \PublishAsync\, \PublishParallelAsync\, and \CreateStream\ methods, all supporting cancellation tokens. Pipeline behaviors are supported through \IPipelineBehavior\ and \IStreamPipelineBehavior\ interfaces, allowing middleware-like processing around handlers. A \Unit\ struct is provided for void responses, and the dependency injection setup includes a warning about Native AOT compatibility for the auto-registration methods.

src/MitMediator · high confidence

Behavioural changes

Added MediatR-style send method compatibility

The library now supports a MediatR-style Send method, enabling users to invoke handlers using the familiar MediatR API. This is achieved by introducing the \IRequestHandler\<TRequest, TResponse\>\ interface and a \MediatRSendMethodInfo\ class that exposes the generic Send method for reflection-based invocation. This change allows existing MediatR users to interact with the mediator using the same patterns they are accustomed to.

src/MitMediator/Tasks · medium confidence

Test coverage

Added comprehensive test coverage for Mediator, Notifications, and Streaming features

Added new test suites in the MitMediator.Tests project to verify the Mediator's request handling, notification publishing, and streaming capabilities. The new tests confirm that the Mediator correctly registers and invokes handlers for standard requests, publishes notifications to all registered handlers, and processes streaming requests with correct pipeline behavior ordering. Additionally, tests validate that the Mediator supports both synchronous and asynchronous handler interfaces, ensuring compatibility with MediatR-style semantics.

tests · high confidence

Dependencies

Upgrade to .NET 10 and update project dependencies

The project has been upgraded to target .NET 10, with all .csproj files in the repository (including the main library, samples, and tests) updated to use the net10.0 framework. This includes adding a new benchmarking project, a native AOT console sample, and a WebApi sample, all targeting .NET 10. Additionally, the main library (MitMediator) now references Microsoft.CodeAnalysis.NetAnalyzers and Microsoft.Extensions.DependencyInjection at version 10.0.0/10.0.100, and the test project uses updated versions of xUnit, Moq, and other testing libraries.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 51 → 55 (+3.7)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 78 (-16.8)
  • Architecture 90 → 91 (+0.9)
  • Maturity 55 → 55 (+0.0)
  • Readiness 49 → 49 (-0.0)
  • Security 40 → 50 (+9.2)
  • Event-Driven 80 → 80 (+0.0)
  • Performance 81 → 81 (+0.0)

Resolved (14)

  • Duplicated block (7 lines × 2) (src/MitMediator/DependencyInjection.cs)
  • Duplicated block (9 lines × 3) (src/MitMediator/DependencyInjection.cs)
  • Duplicated block (9 lines × 3) (src/MitMediator/DependencyInjection.cs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • No exposed public API
  • redundant comment (benchmarks/Benchmarks/Program.cs)
  • redundant comment (samples/NativeAOTConsoleApp/Program.cs)
  • single-maintainer — knowledge-concentration (bus factor) risk

New (23)

  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (43 lines × 2) (samples/NativeAOTConsoleApp/Program.cs)
  • Duplicated block (5 lines × 2) (samples/BooksWebApi/Books.Application/UseCase/Books/Commands/CreateBook/CreateBookCommandValidator.cs)
  • Duplicated block (8 lines × 6) (src/MitMediator/DependencyInjection.cs)
  • Duplicated block (9 lines × 3) (src/MitMediator/DependencyInjection.cs)
  • Duplicated block (9 lines × 3) (src/MitMediator/DependencyInjection.cs)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No checksums published for release artifacts
  • No dependency advisory monitoring
  • …and 3 more

Architecture

  • Unchanged — 1 containers · 2 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dzmprt/MitMediator 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 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8393e1a2e74b0d734ae31ff8ce9fc573f170e898 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.