Class SettingDefinition
- Namespace
- Stratara.Abstractions.Settings
- Assembly
- Stratara.Abstractions.dll
One entry of the application's setting vocabulary: a dotted name, its code-declared default, and its behavioral flags. Definitions are declared once at startup in the SettingCatalog; values are stored separately per SettingScope.
[ExcludeFromCodeCoverage]
public sealed record SettingDefinition : IEquatable<SettingDefinition>
- Inheritance
-
SettingDefinition
- Implements
- Inherited Members
- Extension Methods
Constructors
SettingDefinition(string, string?, bool, bool)
One entry of the application's setting vocabulary: a dotted name, its code-declared default, and its behavioral flags. Definitions are declared once at startup in the SettingCatalog; values are stored separately per SettingScope.
public SettingDefinition(string Name, string? DefaultValue = null, bool IsInherited = true, bool IsEncrypted = false)
Parameters
NamestringThe setting's unique dotted name (for example
"Notifications.Email.Enabled"); namespacing is purely conventional via the dots.DefaultValuestringThe value returned when no scope in the fallback chain (and no configuration entry) carries one;
nullwhen the setting has no default.IsInheritedbooltrue(default): reads fall back through the scope chain (user-in-tenant → user → tenant → global).false: reads consult only the most specific scope for the current session, then configuration/default — a narrower scope never inherits a broader scope's value.IsEncryptedbooltrueto store the value AES-GCM-encrypted at rest (scope-bound associated data via the security plane's blob encryptor); requires anISecureBlobEncryptorregistration.
Properties
DefaultValue
The value returned when no scope in the fallback chain (and no configuration entry) carries
one; null when the setting has no default.
public string? DefaultValue { get; init; }
Property Value
IsEncrypted
true to store the value AES-GCM-encrypted at rest (scope-bound associated data via the
security plane's blob encryptor); requires an ISecureBlobEncryptor registration.
public bool IsEncrypted { get; init; }
Property Value
IsInherited
true (default): reads fall back through the scope chain (user-in-tenant → user →
tenant → global). false: reads consult only the most specific scope for the current
session, then configuration/default — a narrower scope never inherits a broader scope's value.
public bool IsInherited { get; init; }
Property Value
Name
The setting's unique dotted name (for example "Notifications.Email.Enabled");
namespacing is purely conventional via the dots.
public string Name { get; init; }