Space

High-performance, source-generator powered mediator and messaging framework for .NET. Eliminates runtime reflection, minimizes boilerplate, and provides an extensible pipeline model.

.NET Source Generator Mediator NuGet MIT

Why Space?

Zero Runtime Reflection

Handlers, pipelines, and notifications are wired at compile time via source generators.

Extensible Pipelines

Attach cross-cutting concerns like logging, caching, and auditing with minimal ceremony.

Modular Architecture

Split handlers across projects with a root aggregator model for large solutions.

Quick Start

dotnet add package Space.Abstraction
dotnet add package Space.DependencyInjection

services.AddSpace(opt =>
{
    opt.NotificationDispatchType = NotificationDispatchType.Parallel;
});

var response = await space.Send<UserLoginResponse>(new UserLoginRequest("demo"));

Packages

Space.Abstraction

Core abstractions and source generator analyzer.

Space.DependencyInjection

DI extensions and runtime ISpace implementation.

Space.Modules.InMemoryCache

Optional in-memory caching module with attribute integration.