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:
| Host | Generated Class | Method Suffix | Typical Call |
|---|---|---|---|
| Client | DomainFeatureRegistrations | Client | reservoir.AddSpringDomainClient(); |
| Server | DomainServerRegistrations | Server | services.AddSpringDomainServer(); |
| Silo | DomainSiloRegistrations | Silo | services.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.DomainbecomesAddTestAppDomain...CoreLogicbecomesAddCoreLogic...
Domain root extraction rules:
- If namespace contains
.Aggregates., use everything before that segment. - Otherwise, if namespace contains
.Projections., use everything before that segment. - Otherwise, use the full source namespace.
Source:
Generator Inputs By Host
Each host generator composes different generated feature types:
| Host | Included generated registrations | Key discovery attributes |
|---|---|---|
| Client | Aggregate features, saga features, projection features, and optional domain-level builder composition | GenerateCommand, GenerateSagaEndpoints, GenerateProjectionEndpoints |
| Server | Aggregate mappers and projection mappers | GenerateCommand, GenerateProjectionEndpoints, ProjectionPath |
| Silo | Aggregate, saga, and projection registrations | GenerateAggregateEndpoints, 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.