Developer builds open-source .NET mediator that wires handlers at compile time
After repeatedly rewriting result types, validation, caching and registration code for every MediatR project, the developer built Vitreous, an open-source .NET mediator. The push came when MediatR announced it was moving to a commercial model. Vitreous ships these features built in and uses C# source generators to create dependency injection registrations during compilation rather than scanning assemblies at startup. The generator also reports missing or duplicate handlers as build-time warnings and errors instead of runtime failures. The author reports benchmark results against MediatR on .NET 9, with startup cost substantially lower, though the full figures are in the project repository.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in