diff --git a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs index 567b8db0..d340d6bf 100644 --- a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs +++ b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs @@ -63,6 +63,7 @@ public virtual TBootstrap LaunchAsync() Packet.DownloadTimeOut = GetOption(UpdateOption.DownloadTimeOut); Packet.AppName = $"{Packet.AppName ?? GetOption(UpdateOption.MainApp)}{EXECUTABLE_FILE}"; Packet.TempPath = $"{FileUtil.GetTempDirectory(Packet.LastVersion)}{Path.DirectorySeparatorChar}"; + Packet.IsRestore = GetOption(UpdateOption.Restore); var manager = new DownloadManager(Packet.TempPath, Packet.Format, Packet.DownloadTimeOut); manager.MultiAllDownloadCompleted += OnMultiAllDownloadCompleted; manager.MultiDownloadCompleted += OnMultiDownloadCompleted; diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs b/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs index 85b6f039..40f787fc 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs +++ b/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs @@ -131,5 +131,10 @@ public Packet(string mainUpdateUrl, int appType, string updateUrl, string appNam /// File formats in the blacklist will skip the update. /// public List BlackFormats { get; set; } + + /// + /// Whether to enable automatic backup during the upgrade. + /// + public bool IsRestore { get; set; } } } \ No newline at end of file