You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
570 B
29 lines
570 B
1 year ago
|
using System.Text.Json.Serialization;
|
||
|
using StabilityMatrix.Core.Helper;
|
||
|
|
||
|
namespace StabilityMatrix.Core.Models.Update;
|
||
|
|
||
|
public record UpdatePlatforms
|
||
|
{
|
||
|
[JsonPropertyName("win-x64")]
|
||
|
public UpdateInfo? WindowsX64 { get; init; }
|
||
|
|
||
|
[JsonPropertyName("linux-x64")]
|
||
|
public UpdateInfo? LinuxX64 { get; init; }
|
||
|
|
||
|
public UpdateInfo? GetInfoForCurrentPlatform()
|
||
|
{
|
||
|
if (Compat.IsWindows)
|
||
|
{
|
||
|
return WindowsX64;
|
||
|
}
|
||
|
|
||
|
if (Compat.IsLinux)
|
||
|
{
|
||
|
return LinuxX64;
|
||
|
}
|
||
|
|
||
|
return null;
|
||
|
}
|
||
|
}
|