diff --git a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs index 567b8db0b4bbe3f6e4d1406eb05b0430fa36bd12..d340d6bfd84f9dbbac42aa85ad70ba6bb0716892 100644 --- a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs +++ b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs @@ -63,6 +63,7 @@ namespace GeneralUpdate.Core.Bootstrap 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 85b6f03983d1fb6cdd0d4daa6c9de3eb39f207ba..40f787fca3024c41f01b707a6d9ae22c40d988e1 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs +++ b/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs @@ -131,5 +131,10 @@ namespace GeneralUpdate.Core.Domain.Entity /// 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