Namespace OpenSettings.Attributes
Classes
- ComputedIdentifierAttribute
Attribute used to assign a unique identifier (GUID) to setting classes. The computed identifier is either provided directly as a GUID or is computed based on the class full name (or other string identifier) using an MD5 hash of the UTF-8 bytes of the string. This allows each setting to have a unique identifier.
- RegistrationModeAttribute
Specifies how a single settings file (separate setting files should have their own setting or setting class) can be registered and resolved within the service. This attribute supports resolving via configuration options or as a singleton service.
The registration mode can be applied to any class that implements the ISettings interface. It defines how that class is registered within the service container, such as through general or specific configuration options.
There are four possible ways the registration mode can be determined:
- Provider value: If a registration mode is found in the provider source, it will override any other configuration or attribute.
- Attribute value: If no provider source value is found, the registration mode defined in this attribute is used.
- Configuration value in provider source: If neither the provider nor the attribute has a registration mode, the configuration value from the provider source will be applied.
- Default configuration value: If the configuration value from the provider source is missing, the default configuration value will be applied.
- StoreInSeparateFileAttribute
Specifies that a setting should be stored in a separate file, such as
settings-generated.*.json
, rather than the general settings filesettings-generated.json
.