MediatRRise
A modern, lightweight, and extensible in-process messaging library for .NET — inspired by MediatR.
Install / Use
/learn @ademguney/MediatRRiseREADME
MediatR Rise
MediatRRise is a modern, lightweight, and extensible in-process messaging library for .NET.
Inspired by MediatR, it provides a clean and powerful alternative with more flexibility, better testability, and performance-conscious design.
Whether you're building a modular monolith, implementing CQRS, or introducing domain events, MediatRRise helps you decouple your code in a clean and maintainable way.
✨ Features
- ✅
IRequest<T>/IRequestHandler<T, R>based command & query handling - ✅
INotification& multi-handler pub-sub pattern - ✅ Customizable pipeline with
IPipelineBehavior<T, R> - ✅ Clean DI integration: services.AddMediator(...)
- ✅ High testability with mockable abstractions
- ✅ NuGet-friendly, open-source, MIT licensed
📦 Installation
dotnet add package MediatRRise
📁 Project Structure
📁 MediatRRise/
├── 📁 Core/
│ └──📁 MediatRRise.Core.Abstractions/
│ ├──📄 IMediator.cs
│ ├──📄 IRequest.cs
│ ├──📄 IRequestHandler.cs
│ ├──📄 INotification.cs
│ ├──📄 INotificationHandler.cs
│ ├──📄 IPipelineBehavior.cs
│ ├──📄 ICacheableRequest.cs
│ ├──📄 ICacheService.cs
│ └──📄 RequestHandlerDelegate.cs
├──📁 Infrastructure/
│ ├── Implemantation/
│ │ └──⚙️ Mediator.cs
│ ├── Pipeline/
│ │ └──⚙️ PipelineExecutor.cs
│ └── Extensions/
│ ├──⚙️ ServiceCollectionExtensions.cs
│ └──⚙️ MediatRRiseOptions.cs
├──📁 Tests/ (optional but recommended)
│ └──🧪 MediatRRise.Tests/
│ ├──🧪 Unit/
│ ├──🧪 Integration/
│ └──🧪 TestFixtures/
├──📄🛠 MediatRRise.csproj
├──📘 README.md
└──📄 LICENSE
🔗 Example Usage — Sample App
A fully working sample project is available here:
👉 MediatRRise.SampleApp
This project demonstrates:
- ASP.NET Core Web API
- Request/Handler implementation
- FluentValidation integration
- Pipeline behaviors in action (logging, validation, performance, caching)
- In-memory EF Core database
- Clean architecture with separated layers
▶️ Quick Start
git clone https://github.com/ademguney/MediatRRise.SampleApp.git
cd MediatRRise.SampleApp.Api
dotnet run
🧩 Adding MediatRRise to Your Project
To get started with MediatRRise, register it in your dependency injection container:
using MediatRRise.Infrastructure.Extensions;
using Microsoft.Extensions.DependencyInjection;
using System.Reflection;
var services = new ServiceCollection();
// Register MediatRRise handlers from this assembly
services.AddMediator(cfg =>
{
cfg.RegisterServicesFromAssemblies(Assembly.GetExecutingAssembly());
});
⚡️ Adding Pipeline Behaviors
MediatRRise supports IPipelineBehavior<TRequest, TResponse> out of the box. You can define and register your own custom behaviors (such as validation, logging, caching, etc.) in your project.
Example — Validation Behavior Registration:
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(MyCustomValidationBehavior<,>));
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
