Generated the JSON contracts of the stored data at compile time (#1148)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-02 18:23:19 +01:00
1 parent fc7399e81b
commit e954881fda
75 files changed
+5437 -298

No files matched your search

@@ -15,6 +15,20 @@ public record Profile(
bool IsEnterpriseConfiguration = false,
Guid EnterpriseConfigurationPluginId = default): ConfigurationBaseObject
{
//
// The properties of the parameters, declared again to be settable. The source generation of System.Text.Json
// sets every init-only property while it creates the object, also one missing in the JSON, so its value from
// the parameterless constructor would get lost. Keep them first and in the order of the parameters, which is
// the order they get stored in:
//
public override uint Num { get; set; } = Num;
public override string Id { get; set; } = Id;
public override string Name { get; set; } = Name;
public string NeedToKnow { get; set; } = NeedToKnow;
public string Actions { get; set; } = Actions;
public override bool IsEnterpriseConfiguration { get; set; } = IsEnterpriseConfiguration;
public override Guid EnterpriseConfigurationPluginId { get; set; } = EnterpriseConfigurationPluginId;
public Profile() : this(0, Guid.Empty.ToString(), string.Empty, string.Empty, string.Empty)
{
}