docs
Systems
Contracts
ParamsSystem
ParamsSystem Overview

The ParamsSystem provides typed key-value containers, Params, that messages use to carry their data, such as a command's details or a query's answer. Each value is identified by a ParamKey<T>, so values are stored and read as the type their key declares.

Within SaffronLibrary, this system is the shared data carrier for messages. It lives in the _Core/Contracts area, so other systems can depend on it without depending on each other's data formats.

Key responsibilities:

  • Store one value per key, replacing the value when the same key is set again.
  • Return values as the type declared by their key, so callers do not cast.
  • Report whether a key has a value, and throw a clear error when a required value is missing.

This documentation is for developers who define message keys in a domain, populate Params before sending a message, or read values from a received message.