Elarion.Messaging.InMemory 0.2.1-preview.16.1

This is a prerelease version of Elarion.Messaging.InMemory.
dotnet add package Elarion.Messaging.InMemory --version 0.2.1-preview.16.1
                    
NuGet\Install-Package Elarion.Messaging.InMemory -Version 0.2.1-preview.16.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Elarion.Messaging.InMemory" Version="0.2.1-preview.16.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Elarion.Messaging.InMemory" Version="0.2.1-preview.16.1" />
                    
Directory.Packages.props
<PackageReference Include="Elarion.Messaging.InMemory" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Elarion.Messaging.InMemory --version 0.2.1-preview.16.1
                    
#r "nuget: Elarion.Messaging.InMemory, 0.2.1-preview.16.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Elarion.Messaging.InMemory@0.2.1-preview.16.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Elarion.Messaging.InMemory&version=0.2.1-preview.16.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Elarion.Messaging.InMemory&version=0.2.1-preview.16.1&prerelease
                    
Install as a Cake Tool

<div align="center">

<picture> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-dark.svg"> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-light.svg"> <img src="https://raw.githubusercontent.com/swimmesberger/Elarion/main/docs/public/brand/elarion-banner-transparent-light.svg" width="640" alt="Elarion — Application framework for .NET"> </picture>

Module-based handler pipelines, compile-time registration, JSON-RPC hosting, MCP tools for AI agents, and scheduled jobs.

Declare intent next to your code; let source generators do the wiring. No runtime reflection scanning.

AI-native by design: the same handlers that power your API are exposed to AI agents as MCP tools — generated from your code at compile time, with no separate tool definitions or duplicated schemas.

CI NuGet npm .NET License

</div>


Elarion's central idea is simple: your application assemblies define modules and handlers; your host assembly only wires infrastructure, transport, and deployment. Everything that can be discovered from your code — handlers, validators, services, scheduled jobs, RPC methods, EF Core DbSets — is emitted by source generators at compile time instead of scanned by reflection at startup.

[RpcMethod("clients.get")]
public sealed class GetClient(IAppDbContext db)
    : IHandler<GetClient.Query, Result<GetClient.Response>> {
    public sealed record Query(Guid Id);
    public sealed record Response(Guid Id, string Name);

    public async ValueTask<Result<Response>> HandleAsync(Query query, CancellationToken ct) {
        var client = await db.Clients
            .Where(c => c.Id == query.Id)
            .Select(c => new Response(c.Id, c.Name))
            .FirstOrDefaultAsync(ct);

        return client is null
            ? AppError.NotFound($"Client {query.Id} was not found.")
            : client;
    }
}

That one class is a use case, a registered service, a JSON-RPC method, an MCP tool for AI agents, and (optionally) a schema-exported TypeScript contract — with no entry added to any Program.cs registration list.

Why Elarion

  • Compile-time, not reflection — handlers, services, validators, modules, RPC maps, and scheduled jobs become ordinary DI code. Startup is deterministic and AOT-friendly; missing wiring is a build error, not a runtime surprise.
  • Modules own their surface — a module is a namespace plus an [AppModule] marker. Add a handler under it and the module publishes it automatically.
  • Transport-neutral results — handlers return Result<T> with a transport-agnostic AppError; the host maps failures to JSON-RPC, HTTP, or anything else.
  • End-to-end JSON-RPC — mark a handler with [RpcMethod], export a schema at build time, and generate a typed TypeScript + Zod client.
  • AI-native, no extra code — expose the same [RpcMethod] handlers to AI agents as an MCP server, an independent transport with its own dispatcher. Tool names, descriptions, and input schemas are generated from your handlers and [Description] attributes at compile time — no separate tool layer, no duplicated schemas, no runtime reflection. Choose a handler's transports with [RpcMethod(Transports = …)] (JSON-RPC, MCP, or both) and rename a tool with [McpMethod].
  • In-process scheduling — source-generated scheduled jobs with explicit overlap, misfire, and resilience policies.
  • Observable by default — JSON-RPC, scheduling, caching, and resilience emit OpenTelemetry-compatible traces and metrics through System.Diagnostics, with no SDK dependency forced on you.

Install


<ItemGroup>
  <PackageReference Include="Elarion" Version="0.2.0" />
</ItemGroup>
// Turn the generators on, once per assembly
[assembly: UseElarion]

The Quickstart builds a module, a handler, and a working JSON-RPC endpoint end to end.

Packages

Package Purpose
Elarion.Abstractions Attributes and contracts: [AppModule], [Service], [ScheduledJob], IHandler<,>, Result<T>, AppError.
Elarion Runtime primitives: handler caches, decorators, the in-memory scheduler, resilience runtime, current-user access. Bundles the Elarion source generator (handlers, services, validators, modules, RPC/HTTP/MCP maps, resilience policies, scheduled jobs, event consumers).
Elarion.Blobs Provider-neutral blob storage contracts and DTOs.
Elarion.Blobs.PostgreSql PostgreSQL-backed blob storage with EF Core model configuration and Npgsql content I/O.
Elarion.Messaging.InMemory In-memory integration-event bus (best-effort, commit-gated by the EF Core transaction).
Elarion.Messaging.Outbox EF Core transactional outbox: a durable, at-least-once integration-event bus with a polling delivery worker.
Elarion.Paging Keyset (cursor) and offset pagination primitives, opaque cursor codec, and IQueryable paging extensions.
Elarion.JsonRpc Transport-neutral JSON-RPC dispatcher, envelopes, telemetry, and schema export.
Elarion.AspNetCore ASP.NET Core JSON-RPC endpoint mapping, [HttpEndpoint] minimal-API mapping, batch execution, and current-user middleware.
Elarion.AspNetCore.Mcp Exposes your JSON-RPC handlers as a Model Context Protocol (MCP) server for AI agents, over Streamable HTTP.
Elarion.AspNetCore.SchemaGeneration MSBuild package that exports rpc-schema.json during dotnet build.
Elarion.EntityFrameworkCore Marker attributes for generated DbSets and entity inclusion. Bundles the EF Core source generator (DbSet properties, entity configuration, keyset pagination).
@swimmesberger/elarion-jsonrpc-client-generator TypeScript CLI that turns a schema export into method contracts, Zod schemas, and a fetch client.

Documentation

Full guides live at elarion.wimmesberger.dev and in docs/:

Requirements

  • .NET 10 SDK or later
  • ASP.NET Core for the JSON-RPC HTTP transport
  • Node.js 18+ for the TypeScript client generator

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md for the development workflow, validation commands, architecture boundaries, and the publishing process. By participating you agree to the Code of Conduct.

Security

Please report vulnerabilities privately — see the security policy.

License

Elarion is licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.1-preview.16.1 0 6/24/2026
0.2.1-preview.15.1 0 6/24/2026
0.2.1-preview.14.1 0 6/24/2026
0.2.1-preview.13.1 0 6/24/2026
0.2.1-preview.12.1 0 6/24/2026
0.1.2-preview.11.1 0 6/24/2026
0.1.1-preview.10.1 22 6/24/2026
0.1.0-preview.42.1 37 6/23/2026
0.1.0-preview.41.1 38 6/23/2026
0.1.0-preview.40.1 48 6/23/2026
0.1.0-preview.38.1 54 6/21/2026
0.1.0-preview.37.1 49 6/21/2026
0.1.0-preview.5.1 36 6/23/2026
0.1.0-preview.4.1 33 6/23/2026
0.1.0-preview.3.1 49 6/23/2026