EvolutionDescriptorYamlConverter
Models & Types · AiDotNet.Configuration
Reads and writes an EvolutionDescriptorDefinition in a YAML configuration file.
Implements: IYamlTypeConverter
For Beginners
This is what lets you write the archive axes in your YAML file:
How It Works
A descriptor definition is immutable and takes its five values through a constructor that validates them together, which is what stops a half-built axis from ever reaching an archive. The general YAML object mapper can only fill settable properties, so without this converter the one section that decides what an archive measures would be the one section a configuration file could not express. The converter keeps the type immutable and teaches the serializer its shape instead.
The YAML form is a mapping with name, minimum, maximum, binCount, and an optional
outOfRangePolicy naming one of the EvolutionOutOfRangePolicy values. Numbers are read with
the invariant culture so a file means the same thing on every machine, an unknown key is refused rather than
ignored because a misspelled bound would silently change the grid, and the definition’s own constructor performs
the validation, so a configuration file and a code path reject exactly the same mistakes.
Constructors
| Constructor | Summary |
|---|---|
EvolutionDescriptorYamlConverter() |
Methods
| Method | Summary |
|---|---|
bool Accepts(Type type) |
|
object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) |
|
void WriteYaml(IEmitter emitter, object value, Type type, ObjectSerializer serializer) |