mirror of
https://github.com/BlossomiShymae/Needlework.Net.git
synced 2025-12-06 18:20:47 +01:00
Add update checker
This commit is contained in:
12
Needlework.Net.Desktop/GithubRelease.cs
Normal file
12
Needlework.Net.Desktop/GithubRelease.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Needlework.Net.Desktop
|
||||
{
|
||||
public class GithubRelease
|
||||
{
|
||||
[JsonPropertyName("tag_name")]
|
||||
public string TagName { get; set; } = string.Empty;
|
||||
|
||||
public bool IsLatest(int version) => int.Parse(TagName.Replace(".", "")) > version;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user