Add update checker to DI container

This commit is contained in:
Yoshi Askharoun
2025-08-31 18:13:20 -07:00
parent d37a3e31e8
commit d1cf5ab66a
+3 -1
View File
@@ -14,7 +14,7 @@ namespace ZuneModdingHelper
{ {
public const string Title = "Zune Modding Helper"; public const string Title = "Zune Modding Helper";
public static readonly ReleaseVersion Version = new(2024, 5, 18, 0, Phase.Alpha); public static readonly ReleaseVersion Version = new(2025, 8, 20, 0, Phase.Alpha);
public static readonly string VersionStr = Version.ToString(); public static readonly string VersionStr = Version.ToString();
public static readonly System.Uri VersionUri = new($"https://github.com/ZuneDev/ZuneModdingHelper/releases/tag/{VersionStr}"); public static readonly System.Uri VersionUri = new($"https://github.com/ZuneDev/ZuneModdingHelper/releases/tag/{VersionStr}");
@@ -44,6 +44,8 @@ namespace ZuneModdingHelper
Octokit.IGitHubClient github = new Octokit.GitHubClient(new Octokit.ProductHeaderValue(Title.Replace(" ", ""), VersionStr)); Octokit.IGitHubClient github = new Octokit.GitHubClient(new Octokit.ProductHeaderValue(Title.Replace(" ", ""), VersionStr));
services.AddSingleton(github); services.AddSingleton(github);
services.AddSingleton<IUpdateService, GitHubReleasesUpdateService>();
services.AddSingleton<IModCoreConfig>(Settings.Default); services.AddSingleton<IModCoreConfig>(Settings.Default);
services.AddSingleton(Settings.Default); services.AddSingleton(Settings.Default);