mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
feat: Add versioning support to EssentialsConfig
Introduce `Versions` property in `EssentialsConfig` to hold version information. Add `VersionData` class for Essentials and package versions, and `NugetVersion` class for individual package details. Retain and document `SystemTemplateConfigs` class.
This commit is contained in:
@@ -85,6 +85,11 @@ namespace PepperDash.Essentials.Core.Config
|
||||
|
||||
public List<DeviceConfig> Rooms { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Versions
|
||||
/// </summary>
|
||||
public VersionData Versions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EssentialsConfig"/> class.
|
||||
/// </summary>
|
||||
@@ -95,6 +100,50 @@ namespace PepperDash.Essentials.Core.Config
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents version data for Essentials and its packages
|
||||
/// </summary>
|
||||
public class VersionData
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Essentials version
|
||||
/// </summary>
|
||||
[JsonProperty("essentials")]
|
||||
public NugetVersion Essentials { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the list of Packages
|
||||
/// </summary>
|
||||
[JsonProperty("packages")]
|
||||
public List<NugetVersion> Packages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="VersionData"/> class.
|
||||
/// </summary>
|
||||
public VersionData()
|
||||
{
|
||||
Packages = new List<NugetVersion>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a NugetVersion
|
||||
/// </summary>
|
||||
public class NugetVersion
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Version
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the PackageId
|
||||
/// </summary>
|
||||
[JsonProperty("packageId")]
|
||||
public string PackageId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a SystemTemplateConfigs
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user