mediatorlite-abstractions

Document MediatorLite public interfaces, attributes, and validation models for .NET 10.

4|1|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/behl1anmol/MediatorLite --skill mediatorlite-abstractions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mediatorlite-abstractions
Source: https://github.com/behl1anmol/MediatorLite/tree/main/.cursor/skills/mediatorlite-abstractions
Command: npx skills add https://github.com/behl1anmol/MediatorLite --skill mediatorlite-abstractions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the friction of working with MediatorLite's public contract layer by providing a single, authoritative reference for all interfaces, attributes, and validation models that consumers implement and the source generator depends on, removing the need to parse scattered source code or external documentation.

Core Features & Use Cases

  • Full Contract Coverage: Documents all core interfaces including IMediator, IRequest<T>, IRequestHandler<,>, INotification, INotificationHandler<>, IPipelineBehavior<,>, and the Unit struct, plus all compile-time attributes for notification strategies, behavior ordering, and observability opt-outs.
  • Validation Reference: Covers the IValidator<T> contract, ValidationResult, ValidationError, and ValidationException types for integrating custom validation into MediatorLite pipelines.
  • Use Case: Use this Skill when adding new CQRS request/response contracts, configuring compile-time notification execution strategies, customizing pipeline behavior order, or troubleshooting generated mediator dispatch issues.

Quick Start

Use the mediatorlite-abstractions skill to look up the correct implementation pattern for the IRequestHandler<,> interface when building a new query handler for your MediatorLite-powered application.

Frequently Asked Questions about mediatorlite-abstractions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What interfaces do I need to implement for CQRS requests in MediatorLite?

MediatorLite CQRS requests require implementing IRequest<T> for responses and IRequestHandler<,> for handlers. The abstractions layer also includes INotification and INotificationHandler<> for pub/sub patterns, plus the Unit struct for void requests.

How do I add custom validation to a MediatorLite pipeline?

MediatorLite pipeline validation uses the IValidator<T> contract with ValidationResult and ValidationError types. Implement IValidator<T> for your request, and throw ValidationException to halt pipeline execution when validation rules fail.

Can I configure compile-time notification execution strategies in MediatorLite?

Yes, MediatorLite provides compile-time attributes for notification strategies, pipeline behavior ordering, and observability opt-outs. These attributes configure the source generator to emit specific dispatch logic without runtime dependencies.

Does MediatorLite work with .NET 10 and later?

MediatorLite abstractions target .NET 10+ development workflows for CQRS pattern implementation. The public contract layer is dependency-free, requiring no external libraries beyond the core MediatorLite source.

Why does my MediatorLite source generator not find my request handler?

MediatorLite source generation depends on correct implementation of IRequestHandler<,> and associated compile-time attributes. Use this abstraction reference to verify your handler signatures, behavior ordering attributes, and notification strategy configuration match the expected contracts.

How do I customize pipeline behavior order in MediatorLite?

MediatorLite pipeline behavior ordering uses compile-time attributes applied to IPipelineBehavior<,> implementations. Reference the abstractions layer to identify the correct ordering attributes and ensure behaviors execute in the desired sequence during source generation.