Skip to main content

Domain Registration Generators

Overview

This page documents the generated domain-level registration methods that Mississippi emits for client, gateway, and runtime hosts.

Use this page to look up what gets generated, how names are derived, and which generated feature surfaces are included in each host-specific registration method.

Generated Registrations

Three generators emit host-specific extension classes and methods:

HostGenerated ClassMethod SuffixTypical Call
ClientDomainFeatureRegistrationsClientreservoir.AddSpringDomainClient();
ServerDomainServerRegistrationsServerservices.AddSpringDomainServer();
SiloDomainSiloRegistrationsSiloservices.AddSpringDomainSilo();

Source:

Composition Flow

Naming Rules

The domain method prefix is derived from the domain root namespace, then converted to PascalCase and prefixed with Add.

  • TestApp.Domain becomes AddTestAppDomain...
  • CoreLogic becomes AddCoreLogic...

Domain root extraction rules:

  1. If namespace contains .Aggregates., use everything before that segment.
  2. Otherwise, if namespace contains .Projections., use everything before that segment.
  3. Otherwise, use the full source namespace.

Source:

Generator Inputs By Host

Each host generator composes different generated feature types:

HostIncluded generated registrationsKey discovery attributes
ClientAggregate features, saga features, projection features, and optional domain-level builder compositionGenerateCommand, GenerateSagaEndpoints, GenerateProjectionEndpoints
ServerAggregate mappers and projection mappersGenerateCommand, GenerateProjectionEndpoints, ProjectionPath
SiloAggregate, saga, and projection registrationsGenerateAggregateEndpoints, GenerateSagaEndpoints, GenerateProjectionEndpoints

Example Usage

The generated client registration receiver is now IReservoirBuilder, so the client startup shape is:

IReservoirBuilder reservoir = builder.AddReservoir();
reservoir.AddSpringDomainClient();

// Spring.Gateway
builder.Services.AddSpringDomainServer();

// Spring.Runtime
builder.Services.AddSpringDomainSilo();

Representative source:

Notes

  • Domain registration generators reduce host startup wiring by composing generated feature registrations into one method per host surface.
  • Client domain registration generators compose on IReservoirBuilder.
  • This page documents the generated registration layer only. Authorization, migration, and release-specific topics should be documented on their own pages instead of being embedded here.

Summary

  • Domain registration generators reduce per-feature startup wiring.
  • Client domain registration methods extend IReservoirBuilder.
  • Generated method names are host-suffixed (Client, Server, Silo).
  • Method prefixes come from the detected domain root namespace.
  • Runtime and gateway hosts still demonstrate the domain-level registration pattern directly.

Next Steps