Skip to content

Commit

Permalink
Merge pull request #12 from GeneralLibrary/dev
Browse files Browse the repository at this point in the history
Add whether to roll back the configuration
  • Loading branch information
JusterZhu authored Nov 20, 2023
2 parents c867a93 + 0c0b2f7 commit 2ca9191
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<VersionInfo>(Packet.TempPath, Packet.Format, Packet.DownloadTimeOut);
manager.MultiAllDownloadCompleted += OnMultiAllDownloadCompleted;
manager.MultiDownloadCompleted += OnMultiDownloadCompleted;
Expand Down
5 changes: 5 additions & 0 deletions src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,10 @@ public Packet(string mainUpdateUrl, int appType, string updateUrl, string appNam
/// File formats in the blacklist will skip the update.
/// </summary>
public List<string> BlackFormats { get; set; }

/// <summary>
/// Whether to enable automatic backup during the upgrade.
/// </summary>
public bool IsRestore { get; set; }
}
}

0 comments on commit 2ca9191

Please sign in to comment.