mirror of
https://github.com/snltty/linker.git
synced 2025-12-20 10:26:45 +08:00
36 lines
868 B
C#
36 lines
868 B
C#
using linker.config;
|
|
|
|
namespace linker.plugins.updater
|
|
{
|
|
public sealed class UpdaterServerTransfer
|
|
{
|
|
|
|
public string SecretKey => fileConfig.Data.Server.Updater.SecretKey;
|
|
|
|
private UpdateInfo updateInfo = new UpdateInfo { Status = UpdateStatus.Checked };
|
|
private readonly UpdaterHelper updaterHelper;
|
|
private readonly FileConfig fileConfig;
|
|
|
|
public UpdaterServerTransfer(UpdaterHelper updaterHelper, FileConfig fileConfig)
|
|
{
|
|
this.updaterHelper = updaterHelper;
|
|
this.fileConfig = fileConfig;
|
|
}
|
|
|
|
public UpdateInfo Get()
|
|
{
|
|
return updateInfo;
|
|
}
|
|
/// <summary>
|
|
/// 确认更新
|
|
/// </summary>
|
|
public void Confirm(string version)
|
|
{
|
|
updaterHelper.Confirm(updateInfo, version);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|