Source generators overview
Several Roslyn incremental generators under src/KandraCore/Kandra.Generators.* remove
boilerplate a newcomer might otherwise expect to hand-write. Check the generator's own
output in each project's Generated.Net/ folder before writing anything by hand — if it's
already there, you're looking at generated code and should edit the attribute/Dto driving it
instead.
| Generator | Emits | Into |
|---|---|---|
Kandra.Generators.Api | Per-entity CRUD controllers | KandraWms.WebApi |
Kandra.Generators.ClientLib | AddWmsServices() client DI (Refit clients + wrappers) | client project |
Kandra.Generators.EfConfig | IEntityTypeConfiguration<T> | each project's Generated.Net/ |
Kandra.Generators.Di.Application / .Di.Persistence | Per-entity AddDictionary<>/AddDocument<>/behavior/repository/register DI blocks | ConfigureServices.cs |
Kandra.Generators.Equality | Equals/GetHashCode/ToString (+ BuildEqualityPredicate for register Dimensions) | [KandraGeneratedEquality] partials |
Kandra.Generators.Constants | Strongly-typed constant accessors | — |
Kandra.Generators.Ui (Document/Report emitters) | Blazor UI pages | Editors/Printable attribute families |
Discovery generally walks Compilation + referenced-assembly symbols (not
ForAttributeWithMetadataName, which only sees the current project's syntax) because
attributed types typically live in a referenced project (KandraWms.Forms/KandraWms.Domain)
rather than the generator-consuming project itself.
Still hand-written, not generated: the Refit client interfaces themselves (Refit's
compile-time generator can't see generator-emitted interfaces), reports/data-processors' DI
wiring in some configurations, and anything not covered by an attribute family yet — check
the platform's docs/kandra-gaps-tracking.md before assuming a gap is permanent.
See Generated API Reference for the concrete generator API surface once the XML doc sync has run.