Attributes overview
Kandra.Attributes is the metadata vocabulary configuration developers write against. It is
consumed entirely by the Roslyn source generators (Kandra.Generators.*) — there is
(deliberately) very little reflection-at-runtime attribute reading in the engine itself.
Attribute families, grouped by what they attach to:
| Family | Attaches to | Drives |
|---|---|---|
Entities ([KandraDictionaryEntity], [KandraDocumentEntity], [KandraRegisterEntity], ...) | *Base classes | Kandra.Generators.EfConfig, Kandra.Generators.Di.* |
Application ([KandraDictionaryForm(ValidatorType=...)], [KandraDocumentForm], ...) | *Dto classes | Kandra.Generators.Api, Kandra.Generators.ClientLib |
Naming ([Caption], [TabRef], ...) | *Dto properties | Generated UI labels, tab placement |
| Layout / Editors | *Dto properties | [Dropdown], [Search], [Dialog], [FilePicker], [Multiselect] field rendering in the generated Blazor UI |
| Printable | *Dto classes | [SupportedPrintForm] gates the Print button; print-form column formatting |
See the individual generated pages under Generated API Reference for the
full attribute list, constructor parameters, and applicable targets once
scripts/sync-xml-docs.mjs has run against a build with XML doc generation enabled.
Every attribute in this family is designed to be read once, at generation time. If you find
yourself calling GetCustomAttribute<T>() at runtime in application code outside a generator,
that's usually a sign the behavior belongs in a *Behavior class instead.