diff --git a/src/c#/GeneralUpdate.Api/Program.cs b/src/c#/GeneralUpdate.Api/Program.cs index 16c966a513d83e81054358aeb215dd860c0a64c8..21fdb456f400f54a6f9bc6d6ab4c5e6694603bb3 100644 --- a/src/c#/GeneralUpdate.Api/Program.cs +++ b/src/c#/GeneralUpdate.Api/Program.cs @@ -1,8 +1,9 @@ using GeneralUpdate.AspNetCore.DTO; using GeneralUpdate.AspNetCore.Hubs; using GeneralUpdate.AspNetCore.Services; -using GeneralUpdate.Core.Domain.DTO; -using GeneralUpdate.Core.Domain.Enum; +using GeneralUpdate.Differential.Domain.DTO; +using GeneralUpdate.Differential.Domain.Enum; +using GeneralUpdate.Differential.DTO; using Microsoft.AspNetCore.SignalR; using Newtonsoft.Json; @@ -38,7 +39,7 @@ app.MapGet("/versions/{clientType}/{clientVersion}/{clientAppKey}", (int clientT var versions = new List(); var hash = "28d10f1fc2a23dd1afe0af40d132b25c72ea56005963f653c27889f03d381c8d";//生成好的更新包文件的MD5码,因为返回给客户端的时候需要同这个来验证是否可用 var pubTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds(); - string version = null; + string version = string.Empty; if (clientType == AppType.ClientApp) { //client diff --git a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj b/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj index ff68e0369c89c711b549d646a2b611a242bd332e..f4bbc386772d6ffeab6f7754a07206e724b8b692 100644 --- a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj +++ b/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj @@ -1,50 +1,57 @@ 锘 - - netstandard2.0 - GeneralUpdate.ico - GeneralUpdate.png - False - 1.1.0.0 - 1.1.0.0 - 1.1.1 - https://github.com/WELL-E/AutoUpdater - Copyright 漏 2022 - Provide update information proofreading and download update package services. - juster.zhu - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + netstandard2.0 + GeneralUpdate.ico + GeneralUpdate128.png + False + 1.1.0.0 + 1.1.0.0 + 1.1.1 + https://github.com/WELL-E/AutoUpdater + Copyright 漏 2022 + Provide update information proofreading and download update package services. + juster.zhu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ + True + + diff --git a/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs b/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs index 2f79b50014286017c862737c0f0a0ba02d330c5e..237e5c207971045458264b0afabf3d1b1b7878e1 100644 --- a/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs +++ b/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs @@ -1,4 +1,4 @@ -using GeneralUpdate.Core.Utils; +using GeneralUpdate.Differential.Utils; using Microsoft.AspNetCore.SignalR; using System; using System.Threading.Tasks; diff --git a/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs b/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs index d65c71333964f00b4c0d4c6b7bed9f9d35524b6b..155763fe98b487ef4f8b055db54c6a5f60ae7e1b 100644 --- a/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs +++ b/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs @@ -1,6 +1,6 @@ 锘縰sing GeneralUpdate.AspNetCore.DTO; -using GeneralUpdate.Core.Domain.DTO; -using GeneralUpdate.Core.Domain.Enum; +using GeneralUpdate.Differential.Domain.DTO; +using GeneralUpdate.Differential.Domain.Enum; using Newtonsoft.Json; using System; using System.Collections.Generic; diff --git a/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs b/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs index 7e49511e0b371d2ea57b1382098706e90dba1670..995f4547f714b885d264f5238e406106b20ceffe 100644 --- a/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs +++ b/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.DTO; +锘縰sing GeneralUpdate.Differential.Domain.DTO; using System; using System.Collections.Generic; diff --git a/src/c#/GeneralUpdate.Client/MySample.cs b/src/c#/GeneralUpdate.Client/MySample.cs index 6bc123e64c297fe24f696c491bd9e3878f5cc13c..a703ddc7550a3aeccdbfc0aef6602c73cad99b61 100644 --- a/src/c#/GeneralUpdate.Client/MySample.cs +++ b/src/c#/GeneralUpdate.Client/MySample.cs @@ -1,6 +1,6 @@ 锘縰sing GeneralUpdate.ClientCore; using GeneralUpdate.Core.Bootstrap; -using GeneralUpdate.Core.Domain.Entity; +using GeneralUpdate.Differential.Domain.Entity; using GeneralUpdate.Core.Events.MultiEventArgs; using GeneralUpdate.Core.Strategys.PlatformWindows; using System; @@ -8,7 +8,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using GeneralUpdate.Core.Domain.Enum; +using GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Differential; using System.IO; @@ -35,7 +35,7 @@ namespace GeneralUpdate.Client private async void GetMessage(string msg) { var isUpdate = true; - if (isUpdate) Upgrade(); + if (isUpdate) await Upgrade(); } #endregion @@ -200,13 +200,13 @@ namespace GeneralUpdate.Client private void OnMultiDownloadCompleted(object sender, MultiDownloadCompletedEventArgs e) { var info = e.Version as VersionInfo; - DispatchMessage($"{info.Name} download completed."); + DispatchMessage($"{info?.Name} download completed."); } private void OnMultiDownloadError(object sender, MultiDownloadErrorEventArgs e) { var info = e.Version as VersionInfo; - DispatchMessage($"{info.Name} error!"); + DispatchMessage($"{info?.Name} error!"); } private void DispatchMessage(string message) @@ -218,7 +218,7 @@ namespace GeneralUpdate.Client #region 娴嬭瘯浜岃繘鍒舵洿鏂板寘鏁寸悊 - public async Task TestDifferentialClean() + public async Task TestDifferentialClean() { var path1 = "D:\\packet\\source"; var path2 = "D:\\packet\\target"; @@ -226,7 +226,7 @@ namespace GeneralUpdate.Client await DifferentialCore.Instance.Clean(path1, path2, path3); } - public async Task TestDifferentialDirty() + public async Task TestDifferentialDirty() { var path1 = "D:\\packet\\source"; var path2 = "D:\\packet\\patchs"; diff --git a/src/c#/GeneralUpdate.Client/Program.cs b/src/c#/GeneralUpdate.Client/Program.cs index 99480e10585b091829fbb35cf7bf2fdddfc2dd87..bfcc28a622c314aa02574a973a9d9454ca1ca8d6 100644 --- a/src/c#/GeneralUpdate.Client/Program.cs +++ b/src/c#/GeneralUpdate.Client/Program.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.HashAlgorithms; +锘縰sing GeneralUpdate.Differential.HashAlgorithms; namespace GeneralUpdate.Client { @@ -6,7 +6,7 @@ namespace GeneralUpdate.Client { static void Main(string[] args) { - Task.Run(async() => + Task.Run(async () => { //415eed05eb310f480d1e4d15516fa00e484ddb9f416908b217f17b782ded2030 //var zip1 = @"D:\github_project\WpfClient\WebApi\UpdateFiles\WpfClient_1_24.1.5.1218.zip"; diff --git a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs index d5d74d58739a3b2fa09bcb215c62fd7c953b391d..222b27717129fd0c050cd5a993b0ada242a298f7 100644 --- a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs +++ b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs @@ -1,11 +1,11 @@ using GeneralUpdate.Core.Bootstrap; -using GeneralUpdate.Core.Domain.DTO.Assembler; -using GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Entity.Assembler; -using GeneralUpdate.Core.Domain.Enum; -using GeneralUpdate.Core.Domain.Service; -using GeneralUpdate.Core.Exceptions.CustomArgs; -using GeneralUpdate.Core.Exceptions.CustomException; +using GeneralUpdate.Differential.Domain.DTO.Assembler; +using GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Entity.Assembler; +using GeneralUpdate.Differential.Domain.Enum; +using GeneralUpdate.Differential.Domain.Service; +using GeneralUpdate.Differential.Exceptions.CustomArgs; +using GeneralUpdate.Differential.Exceptions.CustomException; using GeneralUpdate.Core.Strategys; using GeneralUpdate.Core.WillMessage; using System; @@ -226,7 +226,7 @@ namespace GeneralUpdate.ClientCore /// Performs all injected custom operations. /// /// - private async Task ExecuteCustomOptions() + private async Task ExecuteCustomOptions() { if (_customTaskOptions.Any()) { @@ -242,7 +242,7 @@ namespace GeneralUpdate.ClientCore foreach (var option in _customOptions) { var isSuccess = option.Invoke(); - if (!isSuccess) + if (!isSuccess) Core.Events.EventManager.Instance.Dispatch>(this, new Core.Events.CommonArgs.ExceptionEventArgs($"{nameof(option)}Execution failure!")); } } @@ -251,7 +251,7 @@ namespace GeneralUpdate.ClientCore /// /// The values passed between processes during previous updates are cleared when the client starts. /// - private void ClearEnvironmentVariable() + private void ClearEnvironmentVariable() { try { @@ -278,7 +278,7 @@ namespace GeneralUpdate.ClientCore foreach (var item in Packet.UpdateVersions) { var msg = willMessage.Message.Peek(); - if (string.Equals(msg.Version, item.Version,StringComparison.OrdinalIgnoreCase)) + if (string.Equals(msg.Version, item.Version, StringComparison.OrdinalIgnoreCase)) { return false; } diff --git a/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs b/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs index fb5af438f60ea570ec7baea88446aefdb7fc0b91..088096f880ddac7f424b3c71f31aa641ecfe37f2 100644 --- a/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs +++ b/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Entity.Assembler; -using GeneralUpdate.Core.Domain.PO; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Entity.Assembler; +using GeneralUpdate.Differential.Domain.PO; +using GeneralUpdate.Differential.Utils; using System; using System.Collections.Generic; using System.Diagnostics; @@ -49,7 +49,7 @@ namespace GeneralUpdate.ClientCore GeneralUpdate.Core.Events.EventManager.Instance.Dispatch>(typeof(GeneralClientOSS), new GeneralUpdate.Core.Events.CommonArgs.ExceptionEventArgs(ex)); throw new Exception($"GeneralClientOSS update exception ! {ex.Message}", ex.InnerException); } - finally + finally { Process.GetCurrentProcess().Kill(); } @@ -62,19 +62,19 @@ namespace GeneralUpdate.ClientCore /// /// /// true: Upgrade required , false: No upgrade is required - private static bool IsUpgrade(string clientVersion,string serverVersion) + private static bool IsUpgrade(string clientVersion, string serverVersion) { if (string.IsNullOrWhiteSpace(clientVersion) || string.IsNullOrWhiteSpace(serverVersion)) return false; Version currentClientVersion = null; Version currentServerVersion = null; bool isParseClientVersion = Version.TryParse(clientVersion, out currentClientVersion); bool isParseServerVersion = Version.TryParse(serverVersion, out currentServerVersion); - if(!isParseClientVersion || !isParseServerVersion) return false; + if (!isParseClientVersion || !isParseServerVersion) return false; if (currentClientVersion < currentServerVersion) return true; return false; } - private static void DownloadFile(string url,string path) + private static void DownloadFile(string url, string path) { using (var webClient = new WebClient()) { diff --git a/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj b/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj index 523523f88d0c808a2bc04c2718cf1fc0a041850c..5d5c36352aad128cd82fd36b7ccaf9a2ab3b3191 100644 --- a/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj +++ b/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj @@ -1,304 +1,303 @@ - - netstandard2.0 - 2.12.10 - juster.zhu - Provides functions related to upgrade and update programs. - GeneralUpdate.ico - GeneralUpdate128.png - False - False - https://github.com/JusterZhu/GeneralUpdate - Copyright 漏 2023 - Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features - https://github.com/JusterZhu/GeneralUpdate - + + netstandard2.0 + 2.12.10 + juster.zhu + Provides functions related to upgrade and update programs. + GeneralUpdate.ico + GeneralUpdate128.png + False + False + https://github.com/JusterZhu/GeneralUpdate + Copyright 漏 2023 + Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features + https://github.com/JusterZhu/GeneralUpdate + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - True - \ - - + + + True + \ + + diff --git a/src/c#/GeneralUpdate.ClientCore/Hubs/VersionHub.cs b/src/c#/GeneralUpdate.ClientCore/Hubs/VersionHub.cs index d8540127169c22e85247fe6dc1e26263252b431d..0ba4c04784343b412deead94039bea3a3672f903 100644 --- a/src/c#/GeneralUpdate.ClientCore/Hubs/VersionHub.cs +++ b/src/c#/GeneralUpdate.ClientCore/Hubs/VersionHub.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Utils; using Microsoft.AspNetCore.SignalR.Client; using System; using System.Threading.Tasks; diff --git a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs index 9b45207b8c84b9b0beb2f1ad5d27afc0d61cc9c9..49e0f713ef19afdb1b9f86deb3b592bd0bf0e5b7 100644 --- a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs +++ b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs @@ -1,11 +1,11 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Download; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; using GeneralUpdate.Core.Strategys; -using GeneralUpdate.Core.Utils; +using GeneralUpdate.Differential.Utils; using System; using System.Collections.Concurrent; using System.Collections.Generic; @@ -95,7 +95,7 @@ namespace GeneralUpdate.Core.Bootstrap return _strategy; } - protected string GetPlatform()=> _strategy.GetPlatform(); + protected string GetPlatform() => _strategy.GetPlatform(); protected IStrategy ExecuteStrategy() { @@ -173,17 +173,17 @@ namespace GeneralUpdate.Core.Bootstrap #region Callback event. - public TBootstrap AddListenerMultiAllDownloadCompleted(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerMultiAllDownloadCompleted(Action callbackAction) => AddListener(callbackAction); - public TBootstrap AddListenerMultiDownloadProgress(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerMultiDownloadProgress(Action callbackAction) => AddListener(callbackAction); - public TBootstrap AddListenerMultiDownloadCompleted(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerMultiDownloadCompleted(Action callbackAction) => AddListener(callbackAction); - public TBootstrap AddListenerMultiDownloadError(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerMultiDownloadError(Action callbackAction) => AddListener(callbackAction); - public TBootstrap AddListenerMultiDownloadStatistics(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerMultiDownloadStatistics(Action callbackAction) => AddListener(callbackAction); - public TBootstrap AddListenerException(Action callbackAction)=> AddListener(callbackAction); + public TBootstrap AddListenerException(Action callbackAction) => AddListener(callbackAction); protected TBootstrap AddListener(Action callbackAction) where TArgs : EventArgs { diff --git a/src/c#/GeneralUpdate.Core/Download/AbstractTask.cs b/src/c#/GeneralUpdate.Core/Download/AbstractTask.cs index 746c40fa4f9f0646e9001963d3c145c1f62d7ffd..902f984a4feb3392b3e4ecede9f672a920156a67 100644 --- a/src/c#/GeneralUpdate.Core/Download/AbstractTask.cs +++ b/src/c#/GeneralUpdate.Core/Download/AbstractTask.cs @@ -1,6 +1,6 @@ 锘縰sing GeneralUpdate.Core.Events.MultiEventArgs; -using GeneralUpdate.Core.Exceptions.CustomArgs; -using GeneralUpdate.Core.Exceptions.CustomException; +using GeneralUpdate.Differential.Exceptions.CustomArgs; +using GeneralUpdate.Differential.Exceptions.CustomException; using System; using System.Collections.Specialized; using System.ComponentModel; diff --git a/src/c#/GeneralUpdate.Core/Download/DownloadTask.cs b/src/c#/GeneralUpdate.Core/Download/DownloadTask.cs index 2389eb953957e907cb73a255331d3d77b7995bd6..2fa9e203ff15cfe303c33e87e77913813d2a666e 100644 --- a/src/c#/GeneralUpdate.Core/Download/DownloadTask.cs +++ b/src/c#/GeneralUpdate.Core/Download/DownloadTask.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.CustomAwaiter; +锘縰sing GeneralUpdate.Differential.CustomAwaiter; using GeneralUpdate.Core.Events.MultiEventArgs; -using GeneralUpdate.Core.Exceptions.CustomArgs; -using GeneralUpdate.Core.Exceptions.CustomException; +using GeneralUpdate.Differential.Exceptions.CustomArgs; +using GeneralUpdate.Differential.Exceptions.CustomException; using System; using System.Globalization; using System.Reflection; diff --git a/src/c#/GeneralUpdate.Core/Driver/CommandExecutor.cs b/src/c#/GeneralUpdate.Core/Driver/CommandExecutor.cs index 55faa1dd738b60f2ecc419535640f5f9d3180ad2..63ca9e0c0ccfeee2d80452e268a416d8aae8b85a 100644 --- a/src/c#/GeneralUpdate.Core/Driver/CommandExecutor.cs +++ b/src/c#/GeneralUpdate.Core/Driver/CommandExecutor.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Exceptions; +锘縰sing GeneralUpdate.Differential.Exceptions; using System; using System.Diagnostics; diff --git a/src/c#/GeneralUpdate.Core/Driver/DriverInformation.cs b/src/c#/GeneralUpdate.Core/Driver/DriverInformation.cs index bf442b9255cc52b31cb569ee6a00d931cdfe486f..08a96c7e1f89f15c2434779878b4874f57deaba8 100644 --- a/src/c#/GeneralUpdate.Core/Driver/DriverInformation.cs +++ b/src/c#/GeneralUpdate.Core/Driver/DriverInformation.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Exceptions; +锘縰sing GeneralUpdate.Differential.Exceptions; using System; using System.Collections.Generic; using System.Linq; @@ -25,12 +25,12 @@ namespace GeneralUpdate.Core.Driver /// public List Drivers { get; private set; } - private DriverInformation(){} + private DriverInformation() { } public class Builder { private DriverInformation _information = new DriverInformation(); - + public Builder SetInstallDirectory(string installDirectory) { _information.InstallDirectory = installDirectory; @@ -56,8 +56,8 @@ namespace GeneralUpdate.Core.Driver public DriverInformation Build() { - if (string.IsNullOrWhiteSpace(_information.InstallDirectory) || - string.IsNullOrWhiteSpace(_information.OutPutDirectory) || + if (string.IsNullOrWhiteSpace(_information.InstallDirectory) || + string.IsNullOrWhiteSpace(_information.OutPutDirectory) || !_information.Drivers.Any()) { ThrowExceptionUtility.ThrowIfNull("Cannot create DriverInformation, not all fields are set."); diff --git a/src/c#/GeneralUpdate.Core/Driver/InstallDriverCommand.cs b/src/c#/GeneralUpdate.Core/Driver/InstallDriverCommand.cs index 74e7a05a07e3677bd3842b9157ef17191cb3c7fe..ed14fca4c532162a04672c8c8f92fb1b5f4ee80f 100644 --- a/src/c#/GeneralUpdate.Core/Driver/InstallDriverCommand.cs +++ b/src/c#/GeneralUpdate.Core/Driver/InstallDriverCommand.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Exceptions; +锘縰sing GeneralUpdate.Differential.Exceptions; using System; using System.IO; using System.Text; @@ -12,7 +12,7 @@ namespace GeneralUpdate.Core.Driver { private DriverInformation _information; - public InstallDriverCommand(DriverInformation information)=> _information = information; + public InstallDriverCommand(DriverInformation information) => _information = information; public void Execute() { diff --git a/src/c#/GeneralUpdate.Core/Driver/RestoreDriverCommand.cs b/src/c#/GeneralUpdate.Core/Driver/RestoreDriverCommand.cs index f36486cbc03ffd4016bd333c3fae1347339692f0..618cebf97f1a47b57f3ba6d8074d352fbd99abbc 100644 --- a/src/c#/GeneralUpdate.Core/Driver/RestoreDriverCommand.cs +++ b/src/c#/GeneralUpdate.Core/Driver/RestoreDriverCommand.cs @@ -1,7 +1,7 @@ 锘縰sing System.IO; using System; using System.Text; -using GeneralUpdate.Core.Exceptions; +using GeneralUpdate.Differential.Exceptions; namespace GeneralUpdate.Core.Driver { @@ -9,7 +9,7 @@ namespace GeneralUpdate.Core.Driver { private DriverInformation _information; - public RestoreDriverCommand(DriverInformation information)=> _information = information; + public RestoreDriverCommand(DriverInformation information) => _information = information; public void Execute() { diff --git a/src/c#/GeneralUpdate.Core/Events/MultiEventArgs/MutiDownloadProgressChangedEventArgs.cs b/src/c#/GeneralUpdate.Core/Events/MultiEventArgs/MutiDownloadProgressChangedEventArgs.cs index 08dc8e35674eb38759ddaeb134037d334beb00b8..b452e51090c4d7a1328c6148a73fd1d7f52bf361 100644 --- a/src/c#/GeneralUpdate.Core/Events/MultiEventArgs/MutiDownloadProgressChangedEventArgs.cs +++ b/src/c#/GeneralUpdate.Core/Events/MultiEventArgs/MutiDownloadProgressChangedEventArgs.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; using System; namespace GeneralUpdate.Core.Events.MultiEventArgs diff --git a/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj b/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj index 1bf63122e25e97558a60270aa0896ad87c26c6cd..7b2a84c416ac7937a4761350ec23362bb9ae4b8c 100644 --- a/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj +++ b/src/c#/GeneralUpdate.Core/GeneralUpdate.Core.csproj @@ -1,57 +1,60 @@ 锘 - - netstandard2.0 - Library - $(AssemblyName) - 4.14.21 - juster.zhu - juster.zhu - false - GeneralUpdate.ico - GeneralUpdate128.png - False - Copyright 漏 2023 - This section describes how to upgrade client applications. - Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features. - https://github.com/JusterZhu/GeneralUpdate - GeneralUpdate.Core - GeneralUpdate.Core - https://github.com/JusterZhu/GeneralUpdate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - \ - - - - - - - + + netstandard2.0 + Library + $(AssemblyName) + 4.14.21 + juster.zhu + juster.zhu + false + GeneralUpdate.ico + GeneralUpdate128.png + False + Copyright 漏 2023 + This section describes how to upgrade client applications. + Provides high-performance, low-loss, resume-breakpoint, version-by-version update, binary differential update, incremental update function, configuration file retention update and other features. + https://github.com/JusterZhu/GeneralUpdate + GeneralUpdate.Core + GeneralUpdate.Core + https://github.com/JusterZhu/GeneralUpdate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + \ + + + + + + + \ No newline at end of file diff --git a/src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs b/src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs index 4cc57610b751277943e4c744f19afa7f613c57bf..b7c2d37eebe226f74cd267d19aa3bd2f7fd47d2a 100644 --- a/src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs +++ b/src/c#/GeneralUpdate.Core/GeneralUpdateBootstrap.cs @@ -1,10 +1,10 @@ 锘縰sing GeneralUpdate.Core.Bootstrap; -using GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Entity.Assembler; -using GeneralUpdate.Core.Domain.Enum; -using GeneralUpdate.Core.Exceptions; +using GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Entity.Assembler; +using GeneralUpdate.Differential.Domain.Enum; +using GeneralUpdate.Differential.Exceptions; using GeneralUpdate.Core.Strategys; -using GeneralUpdate.Core.Utils; +using GeneralUpdate.Differential.Utils; using System; using System.IO; using System.Threading.Tasks; @@ -13,7 +13,7 @@ namespace GeneralUpdate.Core { public class GeneralUpdateBootstrap : AbstractBootstrap { - public GeneralUpdateBootstrap() : base()=> Remote(); + public GeneralUpdateBootstrap() : base() => Remote(); /// /// Gets values from system environment variables (ClientParameter object to base64 string). diff --git a/src/c#/GeneralUpdate.Core/GeneralUpdateOSS.cs b/src/c#/GeneralUpdate.Core/GeneralUpdateOSS.cs index 1a21bd622ca22529f4f7ab1fc134fa2ec9b12938..723603bfe80c8564e42ab98c8dc382a252160493 100644 --- a/src/c#/GeneralUpdate.Core/GeneralUpdateOSS.cs +++ b/src/c#/GeneralUpdate.Core/GeneralUpdateOSS.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; @@ -27,7 +27,7 @@ namespace GeneralUpdate.Core /// /// /// - public static async Task Start(ParamsOSS parameter,Encoding encoding) where TStrategy : AbstractStrategy, new() + public static async Task Start(ParamsOSS parameter, Encoding encoding) where TStrategy : AbstractStrategy, new() { await BaseStart(parameter, encoding); } @@ -82,7 +82,7 @@ namespace GeneralUpdate.Core /// The class that needs to be injected with the corresponding platform update policy or inherits the abstract update policy. /// List of parameter. /// - private static async Task BaseStart(TParams parameter,Encoding encoding) where TStrategy : AbstractStrategy, new() where TParams : class + private static async Task BaseStart(TParams parameter, Encoding encoding) where TStrategy : AbstractStrategy, new() where TParams : class { //Initializes and executes the policy. var strategyFunc = new Func(() => new TStrategy()); diff --git a/src/c#/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs b/src/c#/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs index ae70b982e43e8146fb73ccba56369d9857a7e5a3..161aac433d9a0190005d24a1dcc2d00d9e54ec1a 100644 --- a/src/c#/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs +++ b/src/c#/GeneralUpdate.Core/Pipelines/Context/BaseContext.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using System; using System.Collections.Generic; using System.Text; diff --git a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs index 8d5046639a71463872976ab7548ef9ee150d3614..92fca468f425d6fc254470262580c41519890f7e 100644 --- a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs +++ b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ConfigMiddleware.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.MultiEventArgs; using GeneralUpdate.Core.Pipelines.Context; diff --git a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/HashMiddleware.cs b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/HashMiddleware.cs index 3db8ae943ccfa1e43d1c2491d884bc36328c39f9..a9c19f32b08cc3fa0d00fe9458285264d8f6c7e6 100644 --- a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/HashMiddleware.cs +++ b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/HashMiddleware.cs @@ -1,8 +1,8 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; -using GeneralUpdate.Core.HashAlgorithms; +using GeneralUpdate.Differential.HashAlgorithms; using GeneralUpdate.Core.Pipelines.Context; using System; using System.Threading.Tasks; diff --git a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs index 5e1f8507d5288dd7c0433768093ca469f69aa836..1bd84f2260d0cab1d9447c5ac51cab62f35019b9 100644 --- a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs +++ b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/PatchMiddleware.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.MultiEventArgs; using GeneralUpdate.Core.Pipelines.Context; diff --git a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs index 00402ca0c51e296f6fc061c1ba18c87b93e658ee..627eb8b1955a8586f5522c38cf8e7ecaa5e2bd4a 100644 --- a/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs +++ b/src/c#/GeneralUpdate.Core/Pipelines/Middleware/ZipMiddleware.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; diff --git a/src/c#/GeneralUpdate.Core/Strategys/OSSStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/OSSStrategy.cs index 6a550f33ee88cd8b3c020df506da1c4c465b8f0a..39a79f7af8c398d200450b27e690a1530e266325 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/OSSStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/OSSStrategy.cs @@ -1,12 +1,12 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Enum; -using GeneralUpdate.Core.Domain.PO; -using GeneralUpdate.Core.Domain.PO.Assembler; +锘縰sing GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Enum; +using GeneralUpdate.Differential.Domain.PO; +using GeneralUpdate.Differential.Domain.PO.Assembler; using GeneralUpdate.Core.Download; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; -using GeneralUpdate.Core.Utils; +using GeneralUpdate.Differential.Utils; using GeneralUpdate.Zip; using GeneralUpdate.Zip.Factory; using System; @@ -106,16 +106,16 @@ namespace GeneralUpdate.Core.Strategys try { bool isCompleted = true; - foreach (VersionInfo version in versions) + foreach (VersionInfo version in versions) { - var zipFilePath = Path.Combine(_appPath,$"{version.Name}.zip"); + var zipFilePath = Path.Combine(_appPath, $"{version.Name}.zip"); var zipFactory = new GeneralZipFactory(); zipFactory.UnZipProgress += (sender, e) => EventManager.Instance.Dispatch>(this, new MultiDownloadProgressChangedEventArgs(version, ProgressType.Updatefile, "Updating file...")); - zipFactory.Completed += (sender, e) => + zipFactory.Completed += (sender, e) => { isCompleted = e.IsCompleted; - if(File.Exists(zipFilePath)) File.Delete(zipFilePath); + if (File.Exists(zipFilePath)) File.Delete(zipFilePath); }; zipFactory.CreateOperate(OperationType.GZip, version.Name, zipFilePath, _appPath, false, _encoding); zipFactory.UnZip(); diff --git a/src/c#/GeneralUpdate.Core/Strategys/PlatformLinux/LinuxStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/PlatformLinux/LinuxStrategy.cs index 6ac653b0f72971f701e3670e75edafe32797f11a..a24f0126b343b4c4da66e48f445796c8a21206da 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/PlatformLinux/LinuxStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/PlatformLinux/LinuxStrategy.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; namespace GeneralUpdate.Core.Strategys.PlatformLinux { diff --git a/src/c#/GeneralUpdate.Core/Strategys/PlatformMac/MacStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/PlatformMac/MacStrategy.cs index 0ca92349902b584bd8f67530436dab7feb23cfae..5a86a07cf90f25d83d4f187073a03ae9f879e997 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/PlatformMac/MacStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/PlatformMac/MacStrategy.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Enum; namespace GeneralUpdate.Core.Strategys.PlatformMac { diff --git a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs index 7d46afeb68daa334739e8ace77da21cb259ae6a3..52d9328f0b9526378886581cb7336491528d8e07 100644 --- a/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs +++ b/src/c#/GeneralUpdate.Core/Strategys/PlatformWindows/WindowsStrategy.cs @@ -1,11 +1,11 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Enum; +锘縰sing GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Pipelines; using GeneralUpdate.Core.Pipelines.Context; using GeneralUpdate.Core.Pipelines.Middleware; -using GeneralUpdate.Core.Utils; +using GeneralUpdate.Differential.Utils; using GeneralUpdate.Core.WillMessage; using System; using System.Diagnostics; diff --git a/src/c#/GeneralUpdate.Core/WillMessage/WillMessageManager.cs b/src/c#/GeneralUpdate.Core/WillMessage/WillMessageManager.cs index c7916eef99904587f8bc215c96db87c0964fcf57..4211ce94d5b143474f709788b96c87cbfbdff60f 100644 --- a/src/c#/GeneralUpdate.Core/WillMessage/WillMessageManager.cs +++ b/src/c#/GeneralUpdate.Core/WillMessage/WillMessageManager.cs @@ -1,5 +1,5 @@ -锘縰sing GeneralUpdate.Core.Domain.PO; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Utils; +using GeneralUpdate.Differential.Domain.PO; using System; using System.Collections.Generic; using System.IO; @@ -77,7 +77,7 @@ namespace GeneralUpdate.Core.WillMessage FileUtil.DeleteDir(BACKUP_ROOT_PATH); } - internal void Backup(string appPath, string packetPath, string version,string hash,int appType) + internal void Backup(string appPath, string packetPath, string version, string hash, int appType) { if (!Directory.Exists(BACKUP_ROOT_PATH)) Directory.CreateDirectory(BACKUP_ROOT_PATH); @@ -90,7 +90,7 @@ namespace GeneralUpdate.Core.WillMessage _packetPath = packetPath; _backupPath = versionDir; ProcessDirectory(_packetPath, _appPath, _backupPath); - _backupStack.Push(new BackupPO { Version = version, AppType = appType, AppPath = _appPath, BackupPath = _backupPath , Hash = hash }); + _backupStack.Push(new BackupPO { Version = version, AppType = appType, AppPath = _appPath, BackupPath = _backupPath, Hash = hash }); } internal void Restore() @@ -105,7 +105,7 @@ namespace GeneralUpdate.Core.WillMessage } } - internal void Builder() + internal void Builder() { if (!_backupStack.Any()) return; diff --git a/src/c#/GeneralUpdate.Differential/Config/ConfigFactory.cs b/src/c#/GeneralUpdate.Differential/Config/ConfigFactory.cs index dd840c902ae733ec95e9158c58dce0b858fe4e14..237c4d038f2eee6c361200f5c5e41dae8510e550 100644 --- a/src/c#/GeneralUpdate.Differential/Config/ConfigFactory.cs +++ b/src/c#/GeneralUpdate.Differential/Config/ConfigFactory.cs @@ -1,5 +1,5 @@ -锘縰sing GeneralUpdate.Core.HashAlgorithms; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.HashAlgorithms; +using GeneralUpdate.Differential.Utils; using GeneralUpdate.Differential.Common; using GeneralUpdate.Differential.Config.Cache; using GeneralUpdate.Differential.Config.Handles; diff --git a/src/c#/GeneralUpdate.Differential/Config/Handles/DBHandle.cs b/src/c#/GeneralUpdate.Differential/Config/Handles/DBHandle.cs index 9cbc13de1c6519cd2260e1e4b8fc937bb9b11972..0e8a863e19357967cbefcfcacc80f6e4bd7264ca 100644 --- a/src/c#/GeneralUpdate.Differential/Config/Handles/DBHandle.cs +++ b/src/c#/GeneralUpdate.Differential/Config/Handles/DBHandle.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.CustomAwaiter; +锘縰sing GeneralUpdate.Differential.CustomAwaiter; using System; using System.Threading.Tasks; diff --git a/src/c#/GeneralUpdate.Differential/Config/Handles/IniHandle.cs b/src/c#/GeneralUpdate.Differential/Config/Handles/IniHandle.cs index 8520412cd0baab3e071e8276139f00a88499c29a..f865cd9e48a61052a752869bf73538cc998754b3 100644 --- a/src/c#/GeneralUpdate.Differential/Config/Handles/IniHandle.cs +++ b/src/c#/GeneralUpdate.Differential/Config/Handles/IniHandle.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.CustomAwaiter; +锘縰sing GeneralUpdate.Differential.CustomAwaiter; using System; using System.Collections.Generic; using System.IO; diff --git a/src/c#/GeneralUpdate.Differential/Config/Handles/JsonHandle.cs b/src/c#/GeneralUpdate.Differential/Config/Handles/JsonHandle.cs index 14b41e8dbce475f5182e69607c214ca2c8855a73..cdacb092cdd9201d2417c88cb300d64007562099 100644 --- a/src/c#/GeneralUpdate.Differential/Config/Handles/JsonHandle.cs +++ b/src/c#/GeneralUpdate.Differential/Config/Handles/JsonHandle.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.CustomAwaiter; +锘縰sing GeneralUpdate.Differential.CustomAwaiter; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; @@ -126,7 +126,8 @@ namespace GeneralUpdate.Differential.Config.Handles return result; } - private void Read(string originalJson,string diffJson) { + private void Read(string originalJson, string diffJson) + { JObject originalObject = JObject.Parse(originalJson); JObject diffObject = JObject.Parse(diffJson); } diff --git a/src/c#/GeneralUpdate.Differential/Config/Handles/XmlHandle.cs b/src/c#/GeneralUpdate.Differential/Config/Handles/XmlHandle.cs index e4f9267fcbab434f8b8bdd0b9b20c204cd9d0490..e1f959412e9b33e8969279e27350aa4a4ed96423 100644 --- a/src/c#/GeneralUpdate.Differential/Config/Handles/XmlHandle.cs +++ b/src/c#/GeneralUpdate.Differential/Config/Handles/XmlHandle.cs @@ -1,4 +1,4 @@ -锘縰sing GeneralUpdate.Core.CustomAwaiter; +锘縰sing GeneralUpdate.Differential.CustomAwaiter; using System; using System.Threading.Tasks; diff --git a/src/c#/GeneralUpdate.Differential/ContentProvider/FileProvider.cs b/src/c#/GeneralUpdate.Differential/ContentProvider/FileProvider.cs index f8a6f8fc61872b2c36a00fa7e67a1304f69b88a3..6192c5c082fc1fb623b536064f4d5eaee6ae0091 100644 --- a/src/c#/GeneralUpdate.Differential/ContentProvider/FileProvider.cs +++ b/src/c#/GeneralUpdate.Differential/ContentProvider/FileProvider.cs @@ -1,4 +1,4 @@ -using GeneralUpdate.Core.HashAlgorithms; +using GeneralUpdate.Differential.HashAlgorithms; using GeneralUpdate.Differential.Common; using System; using System.Collections.Generic; @@ -44,7 +44,7 @@ namespace GeneralUpdate.Differential.ContentProvider /// Except collection public async Task> Except(string leftPath, string rightPath) { - return await Task.Run(() => + return await Task.Run(() => { var leftFileNodes = Read(leftPath); var rightFileNodes = Read(rightPath); diff --git a/src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs b/src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaitable.cs similarity index 82% rename from src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs rename to src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaitable.cs index 0c854044ef59f2bba3f9a7787cdd875e50f047cd..419c46db1f749a738893973fb2f90ddba2a6c4f0 100644 --- a/src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaitable.cs +++ b/src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaitable.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.CustomAwaiter +锘縩amespace GeneralUpdate.Differential.CustomAwaiter { public interface IAwaitable where TAwaiter : IAwaiter { diff --git a/src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs b/src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaiter.cs similarity index 85% rename from src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs rename to src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaiter.cs index 42255ef04049a95f5be13fe959d3edc71465c842..dd997a66d3b372966054bfc2b5561cac7d41dcaa 100644 --- a/src/c#/GeneralUpdate.Core/CustomAwaiter/IAwaiter.cs +++ b/src/c#/GeneralUpdate.Differential/CustomAwaiter/IAwaiter.cs @@ -1,6 +1,6 @@ 锘縰sing System.Runtime.CompilerServices; -namespace GeneralUpdate.Core.CustomAwaiter +namespace GeneralUpdate.Differential.CustomAwaiter { public interface IAwaiter : INotifyCompletion { diff --git a/src/c#/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs b/src/c#/GeneralUpdate.Differential/CustomAwaiter/ICriticalAwaiter.cs similarity index 82% rename from src/c#/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs rename to src/c#/GeneralUpdate.Differential/CustomAwaiter/ICriticalAwaiter.cs index f4876ca403c570162f726608567068b5a6108ed2..cb21d10df15fd011640020dc96a2cc7d6eeeb697 100644 --- a/src/c#/GeneralUpdate.Core/CustomAwaiter/ICriticalAwaiter.cs +++ b/src/c#/GeneralUpdate.Differential/CustomAwaiter/ICriticalAwaiter.cs @@ -1,6 +1,6 @@ 锘縰sing System.Runtime.CompilerServices; -namespace GeneralUpdate.Core.CustomAwaiter +namespace GeneralUpdate.Differential.CustomAwaiter { public interface ICriticalAwaiter : IAwaiter, ICriticalNotifyCompletion { diff --git a/src/c#/GeneralUpdate.Differential/DifferentialCore.cs b/src/c#/GeneralUpdate.Differential/DifferentialCore.cs index 44ec20b88fdd91c54dbdc294eb468ba17e7b33a5..63b01d6c50814869893d32ec140fc85eff073b8e 100644 --- a/src/c#/GeneralUpdate.Differential/DifferentialCore.cs +++ b/src/c#/GeneralUpdate.Differential/DifferentialCore.cs @@ -1,5 +1,5 @@ -锘縰sing GeneralUpdate.Core.HashAlgorithms; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.HashAlgorithms; +using GeneralUpdate.Differential.Utils; using GeneralUpdate.Differential.Binary; using GeneralUpdate.Differential.Common; using GeneralUpdate.Differential.ContentProvider; @@ -46,7 +46,7 @@ namespace GeneralUpdate.Differential { lock (_lockObj) { - if (_instance == null) + if (_instance == null) { _instance = new DifferentialCore(); } @@ -80,7 +80,7 @@ namespace GeneralUpdate.Differential //Take the left tree as the center to match the files that are not in the right tree . var fileProvider = new FileProvider(); var nodes = await fileProvider.Compare(sourcePath, targetPath); - + //Binary differencing of like terms . foreach (var file in nodes.Item3) { @@ -116,7 +116,7 @@ namespace GeneralUpdate.Differential //If a file is found that needs to be deleted, a list of files is written to the update package. var exceptFiles = await fileProvider.Except(sourcePath, targetPath); - if(exceptFiles != null && exceptFiles.Count() > 0) + if (exceptFiles != null && exceptFiles.Count() > 0) FileUtil.CreateJson(patchPath, DELETE_FILES_NAME, exceptFiles); } catch (Exception ex) @@ -141,8 +141,8 @@ namespace GeneralUpdate.Differential var oldFiles = FileUtil.GetAllFiles(appPath); //If a JSON file for the deletion list is found in the update package, it will be deleted based on its contents. - var deleteListJson = patchFiles.FirstOrDefault(i=>i.Name.Equals(DELETE_FILES_NAME)); - if (deleteListJson != null) + var deleteListJson = patchFiles.FirstOrDefault(i => i.Name.Equals(DELETE_FILES_NAME)); + if (deleteListJson != null) { var deleteFiles = FileUtil.GetJson>(deleteListJson.FullName); var hashAlgorithm = new Sha256HashAlgorithm(); diff --git a/src/c#/GeneralUpdate.Core/Domain/DO/Assembler/VersionAssembler.cs b/src/c#/GeneralUpdate.Differential/Domain/DO/Assembler/VersionAssembler.cs similarity index 85% rename from src/c#/GeneralUpdate.Core/Domain/DO/Assembler/VersionAssembler.cs rename to src/c#/GeneralUpdate.Differential/Domain/DO/Assembler/VersionAssembler.cs index 867c325fa33cd341a418e7fee22de478f62acb85..ba4bdaaea22fd9f5f9b15aadc1deafdb1eee52b2 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DO/Assembler/VersionAssembler.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DO/Assembler/VersionAssembler.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using System.Collections.Generic; -namespace GeneralUpdate.Core.Domain.DO.Assembler +namespace GeneralUpdate.Differential.Domain.DO.Assembler { public class VersionAssembler { diff --git a/src/c#/GeneralUpdate.Core/Domain/DO/VersionConfigDO.cs b/src/c#/GeneralUpdate.Differential/Domain/DO/VersionConfigDO.cs similarity index 97% rename from src/c#/GeneralUpdate.Core/Domain/DO/VersionConfigDO.cs rename to src/c#/GeneralUpdate.Differential/Domain/DO/VersionConfigDO.cs index a9829bd6474a79e4f42240463eb2ba7c5be5237d..d03305d801f47a8c8fe5bd53a133e060acfc1db7 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DO/VersionConfigDO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DO/VersionConfigDO.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Domain.DO +namespace GeneralUpdate.Differential.Domain.DO { public class VersionConfigDO { diff --git a/src/c#/GeneralUpdate.Core/Domain/DTO/Assembler/VersionAssembler.cs b/src/c#/GeneralUpdate.Differential/Domain/DTO/Assembler/VersionAssembler.cs similarity index 84% rename from src/c#/GeneralUpdate.Core/Domain/DTO/Assembler/VersionAssembler.cs rename to src/c#/GeneralUpdate.Differential/Domain/DTO/Assembler/VersionAssembler.cs index ac850e2b0bac3f01a481ff8b71728b4ed88d1d1e..26e82606a0e3969703445919ebb045edb9429667 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DTO/Assembler/VersionAssembler.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DTO/Assembler/VersionAssembler.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using System.Collections.Generic; -namespace GeneralUpdate.Core.Domain.DTO.Assembler +namespace GeneralUpdate.Differential.Domain.DTO.Assembler { public class VersionAssembler { diff --git a/src/c#/GeneralUpdate.Core/Domain/DTO/BaseResponseDTO.cs b/src/c#/GeneralUpdate.Differential/Domain/DTO/BaseResponseDTO.cs similarity index 77% rename from src/c#/GeneralUpdate.Core/Domain/DTO/BaseResponseDTO.cs rename to src/c#/GeneralUpdate.Differential/Domain/DTO/BaseResponseDTO.cs index 3ebb1f93d46fb3abde0be74ef8368becbe837a42..796f3e5b4a5c2de62c6a48017794ea506379b3d0 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DTO/BaseResponseDTO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DTO/BaseResponseDTO.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.DTO +锘縩amespace GeneralUpdate.Differential.Domain.DTO { public class BaseResponseDTO { diff --git a/src/c#/GeneralUpdate.Core/Domain/DTO/UploadReapDTO.cs b/src/c#/GeneralUpdate.Differential/Domain/DTO/UploadReapDTO.cs similarity index 45% rename from src/c#/GeneralUpdate.Core/Domain/DTO/UploadReapDTO.cs rename to src/c#/GeneralUpdate.Differential/Domain/DTO/UploadReapDTO.cs index c3c59264110627b831dd0cd0f18bfb1e9ff05d91..4b562592c2eadc79c07218447b4e384cb50730f3 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DTO/UploadReapDTO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DTO/UploadReapDTO.cs @@ -1,6 +1,6 @@ -锘縰sing GeneralUpdate.Core.Domain.DTO; +锘縰sing GeneralUpdate.Differential.Domain.DTO; -namespace GeneralUpdate.AspNetCore.DTO +namespace GeneralUpdate.Differential.DTO { public class UploadReapDTO : BaseResponseDTO { diff --git a/src/c#/GeneralUpdate.Core/Domain/DTO/VersionDTO.cs b/src/c#/GeneralUpdate.Differential/Domain/DTO/VersionDTO.cs similarity index 90% rename from src/c#/GeneralUpdate.Core/Domain/DTO/VersionDTO.cs rename to src/c#/GeneralUpdate.Differential/Domain/DTO/VersionDTO.cs index 6f070e7b4aea69075399847a9ca5baaa283bd858..c9d8e92587b6abe129bb4cc86e83cb5d101347a1 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DTO/VersionDTO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DTO/VersionDTO.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.DTO +锘縩amespace GeneralUpdate.Differential.Domain.DTO { public class VersionDTO { diff --git a/src/c#/GeneralUpdate.Core/Domain/DTO/VersionRespDTO.cs b/src/c#/GeneralUpdate.Differential/Domain/DTO/VersionRespDTO.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/DTO/VersionRespDTO.cs rename to src/c#/GeneralUpdate.Differential/Domain/DTO/VersionRespDTO.cs index eda2a878e8d29a1095a9e1488dbdaf6edfd60586..45dcc6edecaa88c4fc56c525878cab26b80de50e 100644 --- a/src/c#/GeneralUpdate.Core/Domain/DTO/VersionRespDTO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/DTO/VersionRespDTO.cs @@ -1,6 +1,6 @@ 锘縰sing System.Collections.Generic; -namespace GeneralUpdate.Core.Domain.DTO +namespace GeneralUpdate.Differential.Domain.DTO { public class VersionRespDTO : BaseResponseDTO { } diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Assembler/ProcessAssembler.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/Assembler/ProcessAssembler.cs similarity index 92% rename from src/c#/GeneralUpdate.Core/Domain/Entity/Assembler/ProcessAssembler.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/Assembler/ProcessAssembler.cs index 62a892863ce7dcc63a2da6be800006b05943e86f..f415684d3fc057684e0afab08f7bd59c648af417 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Assembler/ProcessAssembler.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/Assembler/ProcessAssembler.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Utils; using System; -namespace GeneralUpdate.Core.Domain.Entity.Assembler +namespace GeneralUpdate.Differential.Domain.Entity.Assembler { public class ProcessAssembler { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/Configinfo.cs similarity index 97% rename from src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/Configinfo.cs index 4e4560e718bfc1f3a421dfd210b129445c96feb9..3483a6deb14a3fc2d09a7caaa3e16e073be66916 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Configinfo.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/Configinfo.cs @@ -1,7 +1,7 @@ 锘縰sing System; using System.IO; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class Configinfo : Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Entity.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/Entity.cs similarity index 94% rename from src/c#/GeneralUpdate.Core/Domain/Entity/Entity.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/Entity.cs index a33975edad961a2478d43bce7d61ef2c99328f5b..a7c4e7c569eb52a22c2df1911b5b7292ce37fd6c 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Entity.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/Entity.cs @@ -1,7 +1,7 @@ 锘縰sing System; using System.Text.RegularExpressions; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/Packet.cs similarity index 98% rename from src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/Packet.cs index 8b5e76a15ee23e3d59e967fdec98924f94c2b03c..133d8066c828c824c677872c1a624314040860b7 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/Packet.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/Packet.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class Packet : Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/ParamsOSS.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/ParamsOSS.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/Entity/ParamsOSS.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/ParamsOSS.cs index 8283cd8a9ee98ea964d916221600106b3d187402..5506d926576433dcf2446003a0c0afc041434179 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/ParamsOSS.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/ParamsOSS.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class ParamsOSS : Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/ProcessInfo.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/ProcessInfo.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/Entity/ProcessInfo.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/ProcessInfo.cs index 9788378bb5f4f135a1c81ed98469f56ac03d8b02..56f73e71336150726c3adee87de95ff6c0a79b36 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/ProcessInfo.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/ProcessInfo.cs @@ -1,12 +1,12 @@ -锘縰sing GeneralUpdate.Core.Domain.DTO; -using GeneralUpdate.Core.Domain.DTO.Assembler; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Domain.DTO; +using GeneralUpdate.Differential.Domain.DTO.Assembler; +using GeneralUpdate.Differential.Utils; using System; using System.Collections.Generic; using System.IO; using System.Text; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class ProcessInfo : Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Entity/VersionInfo.cs b/src/c#/GeneralUpdate.Differential/Domain/Entity/VersionInfo.cs similarity index 96% rename from src/c#/GeneralUpdate.Core/Domain/Entity/VersionInfo.cs rename to src/c#/GeneralUpdate.Differential/Domain/Entity/VersionInfo.cs index e1d611b71e38df322a26ab57423ae94194fa71e2..15eea92d59451faa3bffbd6230f8a208fe0bf19f 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Entity/VersionInfo.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Entity/VersionInfo.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Domain.Entity +namespace GeneralUpdate.Differential.Domain.Entity { public class VersionInfo : Entity { diff --git a/src/c#/GeneralUpdate.Core/Domain/Enum/AppType.cs b/src/c#/GeneralUpdate.Differential/Domain/Enum/AppType.cs similarity index 83% rename from src/c#/GeneralUpdate.Core/Domain/Enum/AppType.cs rename to src/c#/GeneralUpdate.Differential/Domain/Enum/AppType.cs index b983ff24b6298defaa76aa55c990614717446c90..8712563f47d79f78ba83e230d75bc288827138f9 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Enum/AppType.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Enum/AppType.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.Enum +锘縩amespace GeneralUpdate.Differential.Domain.Enum { public class AppType { diff --git a/src/c#/GeneralUpdate.Core/Domain/Enum/Format.cs b/src/c#/GeneralUpdate.Differential/Domain/Enum/Format.cs similarity index 70% rename from src/c#/GeneralUpdate.Core/Domain/Enum/Format.cs rename to src/c#/GeneralUpdate.Differential/Domain/Enum/Format.cs index 081e69fc910a812fd46443b6610615f27bd83ce5..497f7e494fb98ca833ccab0e0238f112be4a5e37 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Enum/Format.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Enum/Format.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.Enum +锘縩amespace GeneralUpdate.Differential.Domain.Enum { public class Format { diff --git a/src/c#/GeneralUpdate.Core/Domain/Enum/HttpStatus.cs b/src/c#/GeneralUpdate.Differential/Domain/Enum/HttpStatus.cs similarity index 85% rename from src/c#/GeneralUpdate.Core/Domain/Enum/HttpStatus.cs rename to src/c#/GeneralUpdate.Differential/Domain/Enum/HttpStatus.cs index 3ee8cc306c86a39376f9952c26561735b592ee5d..edbd85f997e0b4b5d78a1edd466d8445db0181a5 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Enum/HttpStatus.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Enum/HttpStatus.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.Enum +锘縩amespace GeneralUpdate.Differential.Domain.Enum { public class HttpStatus { diff --git a/src/c#/GeneralUpdate.Core/Domain/Enum/PlatformType.cs b/src/c#/GeneralUpdate.Differential/Domain/Enum/PlatformType.cs similarity index 95% rename from src/c#/GeneralUpdate.Core/Domain/Enum/PlatformType.cs rename to src/c#/GeneralUpdate.Differential/Domain/Enum/PlatformType.cs index fb1e8aeeb574a3c65879f99adef140b0f7b52c37..979981295d467059bc4cc8fb658658013e5b03bd 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Enum/PlatformType.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Enum/PlatformType.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.Enum +锘縩amespace GeneralUpdate.Differential.Domain.Enum { /// /// Adapt to the update process on different platforms. diff --git a/src/c#/GeneralUpdate.Core/Domain/Enum/ProgressType.cs b/src/c#/GeneralUpdate.Differential/Domain/Enum/ProgressType.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/Enum/ProgressType.cs rename to src/c#/GeneralUpdate.Differential/Domain/Enum/ProgressType.cs index 027268be8a48c3a1c2000e97306e2269123cc409..0a23950accb1c48c6136d7f90a837792e0bbce6a 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Enum/ProgressType.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Enum/ProgressType.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.Enum +锘縩amespace GeneralUpdate.Differential.Domain.Enum { public enum ProgressType { diff --git a/src/c#/GeneralUpdate.Core/Domain/PO/Assembler/VersionAssembler.cs b/src/c#/GeneralUpdate.Differential/Domain/PO/Assembler/VersionAssembler.cs similarity index 84% rename from src/c#/GeneralUpdate.Core/Domain/PO/Assembler/VersionAssembler.cs rename to src/c#/GeneralUpdate.Differential/Domain/PO/Assembler/VersionAssembler.cs index 4b7e0082a5e666e3ce121e18f1f85140efabb73c..9b2c4ed7da1a5ba1c24e5fa916531aa156dcf811 100644 --- a/src/c#/GeneralUpdate.Core/Domain/PO/Assembler/VersionAssembler.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/PO/Assembler/VersionAssembler.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using System.Collections.Generic; -namespace GeneralUpdate.Core.Domain.PO.Assembler +namespace GeneralUpdate.Differential.Domain.PO.Assembler { public class VersionAssembler { diff --git a/src/c#/GeneralUpdate.Core/Domain/PO/VersionPO.cs b/src/c#/GeneralUpdate.Differential/Domain/PO/VersionPO.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/PO/VersionPO.cs rename to src/c#/GeneralUpdate.Differential/Domain/PO/VersionPO.cs index 43f9161711a72435190f435c1f7a01727b9bab09..b3c9acc5436173348a8684ec635121fee36a6723 100644 --- a/src/c#/GeneralUpdate.Core/Domain/PO/VersionPO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/PO/VersionPO.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.PO +锘縩amespace GeneralUpdate.Differential.Domain.PO { /// /// Version data persistence. diff --git a/src/c#/GeneralUpdate.Core/Domain/PO/WillMessagePO.cs b/src/c#/GeneralUpdate.Differential/Domain/PO/WillMessagePO.cs similarity index 96% rename from src/c#/GeneralUpdate.Core/Domain/PO/WillMessagePO.cs rename to src/c#/GeneralUpdate.Differential/Domain/PO/WillMessagePO.cs index 0daf488c9fabc4db62caea39c7397900b2b1a963..8e967353f19313dc86fb736eea3cec35d55e4687 100644 --- a/src/c#/GeneralUpdate.Core/Domain/PO/WillMessagePO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/PO/WillMessagePO.cs @@ -1,7 +1,7 @@ 锘縰sing System; using System.Collections.Generic; -namespace GeneralUpdate.Core.Domain.PO +namespace GeneralUpdate.Differential.Domain.PO { public enum WillMessageStatus { @@ -19,7 +19,7 @@ namespace GeneralUpdate.Core.Domain.PO Failed } - public class BackupPO + public class BackupPO { public string AppPath { get; set; } diff --git a/src/c#/GeneralUpdate.Core/Domain/Service/VersionService.cs b/src/c#/GeneralUpdate.Differential/Domain/Service/VersionService.cs similarity index 86% rename from src/c#/GeneralUpdate.Core/Domain/Service/VersionService.cs rename to src/c#/GeneralUpdate.Differential/Domain/Service/VersionService.cs index 6aa13d7d974d6b8878c6f07114c8429b400fc058..5580f043a57f6ee21cf0bffd458136ddb1409504 100644 --- a/src/c#/GeneralUpdate.Core/Domain/Service/VersionService.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/Service/VersionService.cs @@ -1,10 +1,10 @@ -锘縰sing GeneralUpdate.Core.Domain.DTO; -using GeneralUpdate.Core.Domain.Enum; -using GeneralUpdate.Core.Utils; +锘縰sing GeneralUpdate.Differential.Domain.DTO; +using GeneralUpdate.Differential.Domain.Enum; +using GeneralUpdate.Differential.Utils; using System; using System.Threading.Tasks; -namespace GeneralUpdate.Core.Domain.Service +namespace GeneralUpdate.Differential.Domain.Service { public class VersionService { diff --git a/src/c#/GeneralUpdate.Core/Domain/VO/FileVO.cs b/src/c#/GeneralUpdate.Differential/Domain/VO/FileVO.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Domain/VO/FileVO.cs rename to src/c#/GeneralUpdate.Differential/Domain/VO/FileVO.cs index a8156c49a4972467b3e402a918a3809f65c3766d..cfadd65b7dadad27a88d7a3737919fa787601876 100644 --- a/src/c#/GeneralUpdate.Core/Domain/VO/FileVO.cs +++ b/src/c#/GeneralUpdate.Differential/Domain/VO/FileVO.cs @@ -1,4 +1,4 @@ -锘縩amespace GeneralUpdate.Core.Domain.VO +锘縩amespace GeneralUpdate.Differential.Domain.VO { /// /// file object value. diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/ExceptionArgs.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/ExceptionArgs.cs similarity index 74% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/ExceptionArgs.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/ExceptionArgs.cs index fac82b7983ee4107c17b7877cd1d3e167a19625c..61fabe2770988fe480aa0d63c9809a3477ec0d23 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/ExceptionArgs.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/ExceptionArgs.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Exceptions.CustomArgs +namespace GeneralUpdate.Differential.Exceptions.CustomArgs { [Serializable] public abstract class ExceptionArgs diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/HttpExceptionArgs.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/HttpExceptionArgs.cs similarity index 93% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/HttpExceptionArgs.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/HttpExceptionArgs.cs index 46d976b12301cf0d1d50dc55c82cfa92c023426f..c8743afd15209fb7295dd85c3b4ea7b9b99994dc 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/HttpExceptionArgs.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/HttpExceptionArgs.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Exceptions.CustomArgs +namespace GeneralUpdate.Differential.Exceptions.CustomArgs { [Serializable] public sealed class HttpExceptionArgs : ExceptionArgs diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs similarity index 89% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs index f9bb6e160ec7f0d6f5ddb46ccc9a16d0a95ad97b..ebb831550ce95f7b0d98964acee8ebdd114e7378 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/PatchDirtyExceptionArgs.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Exceptions.CustomArgs +namespace GeneralUpdate.Differential.Exceptions.CustomArgs { [Serializable] public sealed class PatchDirtyExceptionArgs : ExceptionArgs diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UnZipExceptionArgs.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UnZipExceptionArgs.cs similarity index 89% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UnZipExceptionArgs.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UnZipExceptionArgs.cs index eeecb0540dd9ae09736259c55ac3c9c2826d6fb3..c0eb1f818589aa1101e04946782ae0355ad5ca92 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UnZipExceptionArgs.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UnZipExceptionArgs.cs @@ -1,6 +1,6 @@ 锘縰sing System; -namespace GeneralUpdate.Core.Exceptions.CustomArgs +namespace GeneralUpdate.Differential.Exceptions.CustomArgs { [Serializable] internal class UnZipExceptionArgs : ExceptionArgs diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UpdateExceptionArgs.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UpdateExceptionArgs.cs similarity index 88% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UpdateExceptionArgs.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UpdateExceptionArgs.cs index 16c1fb061ccd810c8e5b5e8e340eae7135f096fe..44d7ff493077018f807019091a9f3b6ccbb6ee65 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomArgs/UpdateExceptionArgs.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomArgs/UpdateExceptionArgs.cs @@ -1,7 +1,7 @@ -锘縰sing GeneralUpdate.Core.Domain.Entity; +锘縰sing GeneralUpdate.Differential.Domain.Entity; using System; -namespace GeneralUpdate.Core.Exceptions.CustomArgs +namespace GeneralUpdate.Differential.Exceptions.CustomArgs { [Serializable] internal class UpdateExceptionArgs : ExceptionArgs diff --git a/src/c#/GeneralUpdate.Core/Exceptions/CustomException/GeneralUpdateException.cs b/src/c#/GeneralUpdate.Differential/Exceptions/CustomException/GeneralUpdateException.cs similarity index 92% rename from src/c#/GeneralUpdate.Core/Exceptions/CustomException/GeneralUpdateException.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/CustomException/GeneralUpdateException.cs index 258fc84c9d51de4b7cfb79bf94a2aebbfad65e1a..21f3247caffc9d3eec9b25a52be3f396aa476e42 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/CustomException/GeneralUpdateException.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/CustomException/GeneralUpdateException.cs @@ -1,9 +1,9 @@ -锘縰sing GeneralUpdate.Core.Exceptions.CustomArgs; +锘縰sing GeneralUpdate.Differential.Exceptions.CustomArgs; using System; using System.Runtime.Serialization; using System.Security.Permissions; -namespace GeneralUpdate.Core.Exceptions.CustomException +namespace GeneralUpdate.Differential.Exceptions.CustomException { /// /// Exception of GeneralUpdate framework. @@ -15,7 +15,7 @@ namespace GeneralUpdate.Core.Exceptions.CustomException private const String c_args = "Args"; private readonly TExceptionArgs m_args; - public TExceptionArgs Args=> m_args; + public TExceptionArgs Args => m_args; public GeneralUpdateException(String message = null, Exception innerException = null) : this(null, message, innerException) { diff --git a/src/c#/GeneralUpdate.Core/Exceptions/ThrowExceptionUtility.cs b/src/c#/GeneralUpdate.Differential/Exceptions/ThrowExceptionUtility.cs similarity index 94% rename from src/c#/GeneralUpdate.Core/Exceptions/ThrowExceptionUtility.cs rename to src/c#/GeneralUpdate.Differential/Exceptions/ThrowExceptionUtility.cs index a8bbea558c61a88f30d5812eede561e5108f1987..6fad1fe4ed8e0f5e57e21ac9a3379c9a36d67751 100644 --- a/src/c#/GeneralUpdate.Core/Exceptions/ThrowExceptionUtility.cs +++ b/src/c#/GeneralUpdate.Differential/Exceptions/ThrowExceptionUtility.cs @@ -1,19 +1,19 @@ -锘縰sing GeneralUpdate.Core.Exceptions.CustomArgs; +锘縰sing GeneralUpdate.Differential.Exceptions.CustomArgs; using System; using System.IO; -namespace GeneralUpdate.Core.Exceptions +namespace GeneralUpdate.Differential.Exceptions { internal sealed class ThrowExceptionUtility { - public static void ThrowGeneralUpdateException(ExceptionArgs args) + public static void ThrowGeneralUpdateException(ExceptionArgs args) => Throw(args.ToString(), args); #region Common public static void ThrowFileNotFound(string file) => Throw($"File cannot be accessed {file}!"); - public static void ThrowIfNull(string errorMessage = null) + public static void ThrowIfNull(string errorMessage = null) { errorMessage = errorMessage ?? "Parameter cannot be null"; Throw(errorMessage); diff --git a/src/c#/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj b/src/c#/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj index 00fffc8937275530eeed7553838a499711a6cf66..bcc61f0d430550d488b9d09b835573a70cb9e688 100644 --- a/src/c#/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj +++ b/src/c#/GeneralUpdate.Differential/GeneralUpdate.Differential.csproj @@ -1,77 +1,58 @@ 锘 - - netstandard2.0 - GeneralUpdate.ico - GeneralUpdate128.png - False - https://github.com/JusterZhu/GeneralUpdate - The binary differential update function is provided, but the configuration file update function is reserved. - juster.zhu - 1.4.3 - https://github.com/JusterZhu/GeneralUpdate - Copyright 漏 2023 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - \ - - - - - - + + netstandard2.0 + GeneralUpdate.ico + GeneralUpdate128.png + False + https://github.com/JusterZhu/GeneralUpdate + The binary differential update function is provided, but the configuration file update function is reserved. + juster.zhu + 1.4.3 + https://github.com/JusterZhu/GeneralUpdate + Copyright 漏 2023 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + True + \ + + + + + + diff --git a/src/c#/GeneralUpdate.Core/HashAlgorithms/HashAlgorithmBase.cs b/src/c#/GeneralUpdate.Differential/HashAlgorithms/HashAlgorithmBase.cs similarity index 90% rename from src/c#/GeneralUpdate.Core/HashAlgorithms/HashAlgorithmBase.cs rename to src/c#/GeneralUpdate.Differential/HashAlgorithms/HashAlgorithmBase.cs index 09ed6b71e200a730cf74d6ac61ad62bf69496379..5d451bfe2d277fcb61ceb8980206823aaec47c49 100644 --- a/src/c#/GeneralUpdate.Core/HashAlgorithms/HashAlgorithmBase.cs +++ b/src/c#/GeneralUpdate.Differential/HashAlgorithms/HashAlgorithmBase.cs @@ -1,9 +1,9 @@ -锘縰sing GeneralUpdate.Core.Exceptions; +锘縰sing GeneralUpdate.Differential.Exceptions; using System.IO; using System.Security.Cryptography; using System.Text; -namespace GeneralUpdate.Core.HashAlgorithms +namespace GeneralUpdate.Differential.HashAlgorithms { public abstract class HashAlgorithmBase { diff --git a/src/c#/GeneralUpdate.Core/HashAlgorithms/Md5HashAlgorithm.cs b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Md5HashAlgorithm.cs similarity index 46% rename from src/c#/GeneralUpdate.Core/HashAlgorithms/Md5HashAlgorithm.cs rename to src/c#/GeneralUpdate.Differential/HashAlgorithms/Md5HashAlgorithm.cs index d7bbd0bcb17bf92a7085eaca9a0b8f0b0a3d415f..175e191fcfb7dced23636b4a5c9d58e583c89959 100644 --- a/src/c#/GeneralUpdate.Core/HashAlgorithms/Md5HashAlgorithm.cs +++ b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Md5HashAlgorithm.cs @@ -1,9 +1,9 @@ 锘縰sing System.Security.Cryptography; -namespace GeneralUpdate.Core.HashAlgorithms +namespace GeneralUpdate.Differential.HashAlgorithms { public class Md5HashAlgorithm : HashAlgorithmBase { - protected override HashAlgorithm GetHashAlgorithm()=> MD5.Create(); + protected override HashAlgorithm GetHashAlgorithm() => MD5.Create(); } } diff --git a/src/c#/GeneralUpdate.Core/HashAlgorithms/Sha1HashAlgorithm.cs b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha1HashAlgorithm.cs similarity index 45% rename from src/c#/GeneralUpdate.Core/HashAlgorithms/Sha1HashAlgorithm.cs rename to src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha1HashAlgorithm.cs index 1013e2f7fcbef2dbf4f5439b6fe05fa5690dd8c3..da7171f7d619ecd74ffc00cfb79c17d1aebbe596 100644 --- a/src/c#/GeneralUpdate.Core/HashAlgorithms/Sha1HashAlgorithm.cs +++ b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha1HashAlgorithm.cs @@ -1,9 +1,9 @@ 锘縰sing System.Security.Cryptography; -namespace GeneralUpdate.Core.HashAlgorithms +namespace GeneralUpdate.Differential.HashAlgorithms { public class Sha1HashAlgorithm : HashAlgorithmBase { - protected override HashAlgorithm GetHashAlgorithm()=> new SHA1Managed(); + protected override HashAlgorithm GetHashAlgorithm() => new SHA1Managed(); } } diff --git a/src/c#/GeneralUpdate.Core/HashAlgorithms/Sha256HashAlgorithm.cs b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha256HashAlgorithm.cs similarity index 46% rename from src/c#/GeneralUpdate.Core/HashAlgorithms/Sha256HashAlgorithm.cs rename to src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha256HashAlgorithm.cs index e88290a3e93ba40c9f77a455acc65f5b7f29d7de..900d53df3d0bd9842f7d1c1ad07c16bfd8251299 100644 --- a/src/c#/GeneralUpdate.Core/HashAlgorithms/Sha256HashAlgorithm.cs +++ b/src/c#/GeneralUpdate.Differential/HashAlgorithms/Sha256HashAlgorithm.cs @@ -1,9 +1,9 @@ 锘縰sing System.Security.Cryptography; -namespace GeneralUpdate.Core.HashAlgorithms +namespace GeneralUpdate.Differential.HashAlgorithms { public class Sha256HashAlgorithm : HashAlgorithmBase { - protected override HashAlgorithm GetHashAlgorithm()=> SHA256.Create(); + protected override HashAlgorithm GetHashAlgorithm() => SHA256.Create(); } } diff --git a/src/c#/GeneralUpdate.Core/Utils/ConvertUtil.cs b/src/c#/GeneralUpdate.Differential/Utils/ConvertUtil.cs similarity index 97% rename from src/c#/GeneralUpdate.Core/Utils/ConvertUtil.cs rename to src/c#/GeneralUpdate.Differential/Utils/ConvertUtil.cs index 6e197394fe34a0e75aa8bdbded555c8acbaf8900..7bad4b0433e4b57b40a0215150f88068e1d685a1 100644 --- a/src/c#/GeneralUpdate.Core/Utils/ConvertUtil.cs +++ b/src/c#/GeneralUpdate.Differential/Utils/ConvertUtil.cs @@ -1,6 +1,6 @@ 锘縰sing System.Text; -namespace GeneralUpdate.Core.Utils +namespace GeneralUpdate.Differential.Utils { public class ConvertUtil { diff --git a/src/c#/GeneralUpdate.Core/Utils/FileUtil.cs b/src/c#/GeneralUpdate.Differential/Utils/FileUtil.cs similarity index 83% rename from src/c#/GeneralUpdate.Core/Utils/FileUtil.cs rename to src/c#/GeneralUpdate.Differential/Utils/FileUtil.cs index 482dec9c28ddba80e178c464f27f19837aa67cfa..1726eaaf2ae1f1be265f5d73f90f46250194e638 100644 --- a/src/c#/GeneralUpdate.Core/Utils/FileUtil.cs +++ b/src/c#/GeneralUpdate.Differential/Utils/FileUtil.cs @@ -3,7 +3,7 @@ using System; using System.Collections.Generic; using System.IO; -namespace GeneralUpdate.Core.Utils +namespace GeneralUpdate.Differential.Utils { public static class FileUtil { @@ -37,10 +37,10 @@ namespace GeneralUpdate.Core.Utils } } - public static void CreateJson(string targetPath,string fileName,T obj) + public static void CreateJson(string targetPath, string fileName, T obj) { if (!Directory.Exists(targetPath)) Directory.CreateDirectory(targetPath); - var fileFullPath = Path.Combine(targetPath,fileName); + var fileFullPath = Path.Combine(targetPath, fileName); if (File.Exists(fileFullPath)) File.Delete(fileFullPath); var jsonString = JsonConvert.SerializeObject(obj); File.WriteAllText(fileFullPath, jsonString); @@ -48,12 +48,12 @@ namespace GeneralUpdate.Core.Utils public static T GetJson(string path) { - if (File.Exists(path)) + if (File.Exists(path)) { - var json = File.ReadAllText(path); - if (json != null) + var json = File.ReadAllText(path); + if (json != null) { - return JsonConvert.DeserializeObject(json); + return JsonConvert.DeserializeObject(json); } } return default(T); diff --git a/src/c#/GeneralUpdate.Core/Utils/HttpUtil.cs b/src/c#/GeneralUpdate.Differential/Utils/HttpUtil.cs similarity index 95% rename from src/c#/GeneralUpdate.Core/Utils/HttpUtil.cs rename to src/c#/GeneralUpdate.Differential/Utils/HttpUtil.cs index 798944251314ed9a34d775a1e4093d412cdeb79a..be9e8c4719392e0106eb6a3840f40c5f3ac533a9 100644 --- a/src/c#/GeneralUpdate.Core/Utils/HttpUtil.cs +++ b/src/c#/GeneralUpdate.Differential/Utils/HttpUtil.cs @@ -9,7 +9,7 @@ using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; -namespace GeneralUpdate.Core.Utils +namespace GeneralUpdate.Differential.Utils { public sealed class HttpUtil { @@ -49,7 +49,7 @@ namespace GeneralUpdate.Core.Utils } } - public static async Task PostFileTaskAsync(string httpUrl, Dictionary parameters, string filePath) + public static async Task PostFileTaskAsync(string httpUrl, Dictionary parameters, string filePath) { try { @@ -57,7 +57,7 @@ namespace GeneralUpdate.Core.Utils using (var client = new HttpClient()) using (var content = new MultipartFormDataContent()) { - foreach (var parameter in parameters) + foreach (var parameter in parameters) { var stringContent = new StringContent(parameter.Value); content.Add(stringContent, parameter.Key); diff --git a/src/c#/GeneralUpdate.Core/Utils/SerializeUtil.cs b/src/c#/GeneralUpdate.Differential/Utils/SerializeUtil.cs similarity index 96% rename from src/c#/GeneralUpdate.Core/Utils/SerializeUtil.cs rename to src/c#/GeneralUpdate.Differential/Utils/SerializeUtil.cs index 14d5a27ad2ab5b801b46a2499cd954308ffd7021..19eec8c87bde65a0de2f06f6331303fdadbd3577 100644 --- a/src/c#/GeneralUpdate.Core/Utils/SerializeUtil.cs +++ b/src/c#/GeneralUpdate.Differential/Utils/SerializeUtil.cs @@ -2,7 +2,7 @@ using System; using System.Text; -namespace GeneralUpdate.Core.Utils +namespace GeneralUpdate.Differential.Utils { /// /// Arbitrary object serialization. diff --git a/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj b/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj index 3bd060bd1d58a73e871f2ebfa59d8fe262918a77..ec2e38e15130a250b59db715196c2809c647d36f 100644 --- a/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj +++ b/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj @@ -1,25 +1,25 @@ - - net8.0 - enable - enable - dotnet-GeneralUpdate.SystemService-bedd09fc-af1b-4a6f-ab25-948dc94428ae - + + net8.0 + + enable + dotnet-GeneralUpdate.SystemService-bedd09fc-af1b-4a6f-ab25-948dc94428ae + - - - - + + + + - - + + + - - - - + + + + diff --git a/src/c#/GeneralUpdate.Upgrad/Program.cs b/src/c#/GeneralUpdate.Upgrad/Program.cs index 0a9e88af83c568c01d740fc87e3d3b33a2f8fd62..d7c1887e08d9dbd922487d581e9eaf76e43db504 100644 --- a/src/c#/GeneralUpdate.Upgrad/Program.cs +++ b/src/c#/GeneralUpdate.Upgrad/Program.cs @@ -1,7 +1,7 @@ 锘縰sing GeneralUpdate.Core; using GeneralUpdate.Core.Bootstrap; -using GeneralUpdate.Core.Domain.Entity; -using GeneralUpdate.Core.Domain.Enum; +using GeneralUpdate.Differential.Domain.Entity; +using GeneralUpdate.Differential.Domain.Enum; using GeneralUpdate.Core.Events.CommonArgs; using GeneralUpdate.Core.Events.MultiEventArgs; using GeneralUpdate.Core.Strategys; diff --git a/src/c#/GeneralUpdate.Zip/GZip/GeneralZip.cs b/src/c#/GeneralUpdate.Zip/GZip/GeneralZip.cs index ea43a7a33ac576b4ed02d25068b128a0e6b651b8..dbe5aeefe65f680847bae2ab4f19f76309bc0e86 100644 --- a/src/c#/GeneralUpdate.Zip/GZip/GeneralZip.cs +++ b/src/c#/GeneralUpdate.Zip/GZip/GeneralZip.cs @@ -233,7 +233,8 @@ namespace GeneralUpdate.Zip.GZip var greatFolder = Directory.GetParent(filePath); if (!greatFolder.Exists) greatFolder.Create(); //ADAPTS to .NET 6 and above decompression updates. - entries.ExtractToFile(filePath); + entries.ExtractToFile(filePath, true); + //var content = new byte[entries.Length]; //entries.Open().Read(content, 0, content.Length);