diff --git a/src/c#/GeneralUpdate.Api/GeneralUpdate.Api.csproj b/src/c#/GeneralUpdate.Api/GeneralUpdate.Api.csproj
deleted file mode 100644
index fd8c7c45d24c49d66ab5e79ad5ee4864602a48a2..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.Api/GeneralUpdate.Api.csproj
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- net8.0
- enable
- enable
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/c#/GeneralUpdate.Api/Program.cs b/src/c#/GeneralUpdate.Api/Program.cs
deleted file mode 100644
index 16c966a513d83e81054358aeb215dd860c0a64c8..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.Api/Program.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-using GeneralUpdate.AspNetCore.DTO;
-using GeneralUpdate.AspNetCore.Hubs;
-using GeneralUpdate.AspNetCore.Services;
-using GeneralUpdate.Core.Domain.DTO;
-using GeneralUpdate.Core.Domain.Enum;
-using Microsoft.AspNetCore.SignalR;
-using Newtonsoft.Json;
-
-var builder = WebApplication.CreateBuilder(args);
-builder.Services.AddSingleton();
-builder.Services.AddSignalR();
-var app = builder.Build();
-
-/**
- * Push the latest version information in real time.
- */
-//app.MapHub("/versionhub");
-
-//app.MapPost("/push", async Task (HttpContext context) =>
-//{
-// try
-// {
-// var hubContext = context.RequestServices.GetRequiredService>();
-// await hubContext.SendMessage("TESTNAME", "123");
-// }
-// catch (Exception ex)
-// {
-// return ex.Message;
-// }
-// return "OK";
-//});
-
-/**
- * Check if an update is required.
- */
-app.MapGet("/versions/{clientType}/{clientVersion}/{clientAppKey}", (int clientType, string clientVersion, string clientAppKey, IUpdateService updateService) =>
-{
- var versions = new List();
- var hash = "28d10f1fc2a23dd1afe0af40d132b25c72ea56005963f653c27889f03d381c8d";//生成好的更新包文件的MD5码,因为返回给客户端的时候需要同这个来验证是否可用
- var pubTime = new DateTimeOffset(DateTime.UtcNow).ToUnixTimeSeconds();
- string version = null;
- if (clientType == AppType.ClientApp)
- {
- //client
- //version = "0.0.0.0";
- version = "9.9.9.9";//这里设置为9是让程序认为需要更新
- }
- else if (clientType == AppType.UpgradeApp)
- {
- //upgrad
- version = "0.0.0.0";
- //version = "9.9.9.9"; //这里设置为9是让程序认为需要更新
- }
- var url = $"http://192.168.1.7/WpfClient_1_24.1.5.1218.zip";//更新包的下载地址
- var name = "update";
- versions.Add(new VersionDTO(hash, pubTime, version, url, name));
- return updateService.Update(clientType, clientVersion, version, clientAppKey, GetAppSecretKey(), false, versions);
-});
-
-/**
- * Upload update package.
- */
-app.MapPost("/upload", async Task (HttpContext context, HttpRequest request) =>
-{
- var uploadReapDTO = new UploadReapDTO();
- try
- {
- var contextReq = context.Request;
- int.TryParse(contextReq.Form["clientType"], out int clientType);
- var version = contextReq.Form["clientType"].ToString();
- var clientAppKey = contextReq.Form["clientAppKey"].ToString();
- var hash = contextReq.Form["hash"].ToString();
-
- if (!request.HasFormContentType) throw new Exception("ContentType was not included in the request !");
- var form = await request.ReadFormAsync();
-
- var formFile = form.Files["file"];
- if (formFile is null || formFile.Length == 0) throw new ArgumentNullException("Uploaded update package file not found !");
- await using var stream = formFile.OpenReadStream();
- byte[] buffer = new byte[stream.Length];
- stream.Read(buffer, 0, buffer.Length);
- //TODO:save to file server.
- string localPath = $"E:\\{formFile.FileName}";
- await using var fileStream = new FileStream(localPath, FileMode.CreateNew, FileAccess.Write);
- fileStream.Write(buffer, 0, buffer.Length);
-
- //TODO: data persistence.To mysql , sqlserver....
-
- uploadReapDTO.Code = HttpStatus.OK;
- uploadReapDTO.Body = "Published successfully.";
- uploadReapDTO.Message = RespMessage.RequestSucceeded;
- return JsonConvert.SerializeObject(uploadReapDTO);
- }
- catch (Exception ex)
- {
- uploadReapDTO.Code = HttpStatus.BAD_REQUEST;
- uploadReapDTO.Body = $"Failed to publish ! Because : {ex.Message}";
- uploadReapDTO.Message = RespMessage.RequestFailed;
- return JsonConvert.SerializeObject(uploadReapDTO);
- }
-});
-
-app.Run();
-
-string GetAppSecretKey()
-{
- return "B8A7FADD-386C-46B0-B283-C9F963420C7C";
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Api/Properties/launchSettings.json b/src/c#/GeneralUpdate.Api/Properties/launchSettings.json
deleted file mode 100644
index 8ea702e82de6042f5ebcb464efa91392e29c21a7..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.Api/Properties/launchSettings.json
+++ /dev/null
@@ -1,30 +0,0 @@
-锘縶
- "$schema": "https://json.schemastore.org/launchsettings.json",
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:43557",
- "sslPort": 44365
- }
- },
- "profiles": {
- "GeneralUpdate.Api": {
- "commandName": "Project",
- "dotnetRunMessages": true,
- "launchBrowser": true,
- "applicationUrl": "http://127.0.0.1:5001",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "swagger",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Api/appsettings.Development.json b/src/c#/GeneralUpdate.Api/appsettings.Development.json
deleted file mode 100644
index 1b2d3bafd88df424abf0d47e2147edd8358bae7a..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.Api/appsettings.Development.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Api/appsettings.json b/src/c#/GeneralUpdate.Api/appsettings.json
deleted file mode 100644
index ec04bc120fb7f339ce3c5ef898d3db32f7366a0c..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.Api/appsettings.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "AllowedHosts": "*"
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.AspNetCore/DTO/RespMessage.cs b/src/c#/GeneralUpdate.AspNetCore/DTO/RespMessage.cs
deleted file mode 100644
index fb89b3e611450616fd480626cfed0164228eac2e..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/DTO/RespMessage.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-锘縩amespace GeneralUpdate.AspNetCore.DTO
-{
- public class RespMessage
- {
- public const string RequestSucceeded = "Request succeeded.";
-
- public const string RequestFailed = "Request failed锛";
-
- public const string RequestNone = "No need to update.";
-
- public const string ServerException = "Server internal exception锛";
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj b/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj
deleted file mode 100644
index ff68e0369c89c711b549d646a2b611a242bd332e..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.AspNetCore.csproj
+++ /dev/null
@@ -1,50 +0,0 @@
-锘
-
-
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.ico b/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.ico
deleted file mode 100644
index 7cb4a86c1bbf84baf7b783ab21b4a7e1cf700455..0000000000000000000000000000000000000000
Binary files a/src/c#/GeneralUpdate.AspNetCore/GeneralUpdate.ico and /dev/null differ
diff --git a/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs b/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs
deleted file mode 100644
index 2f79b50014286017c862737c0f0a0ba02d330c5e..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/Hubs/VersionHub.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using GeneralUpdate.Core.Utils;
-using Microsoft.AspNetCore.SignalR;
-using System;
-using System.Threading.Tasks;
-
-namespace GeneralUpdate.AspNetCore.Hubs
-{
- public enum HubStatus
- {
- Connected = 1,
- Disconnected = 2
- }
-
- public class VersionHub : Hub
- {
- #region Private Members
-
- private const string ReceiveMessageflag = "ReceiveMessage";
- private const string SendMessageflag = "SendMessage";
- private const string Onlineflag = "Online";
- private const string GroupName = "VersionGroup";
-
- public delegate void ConnectionStatus(HubStatus hubStatus, string message);
-
- public event ConnectionStatus OnConnectionStatus;
-
- #endregion Private Members
-
- #region Public Methods
-
- public override async Task OnConnectedAsync()
- {
- await Groups.AddToGroupAsync(Context.ConnectionId, GroupName);
- await base.OnConnectedAsync();
- if (OnConnectionStatus != null) OnConnectionStatus(HubStatus.Connected, "The Version hub is connected .");
- }
-
- public override async Task OnDisconnectedAsync(Exception exception)
- {
- await Groups.RemoveFromGroupAsync(Context.ConnectionId, GroupName);
- await base.OnDisconnectedAsync(exception);
- if (OnConnectionStatus != null) OnConnectionStatus(HubStatus.Disconnected, "The Version hub is disconnected !");
- }
-
- ///
- /// Kick client connection from group.
- ///
- /// client connectionId.
- ///
- public async Task Remove(string connectionId)
- {
- if (string.IsNullOrWhiteSpace(connectionId))
- throw new ArgumentNullException($"'VersionHub' The required parameter remove cannot be null !");
-
- try
- {
- await Groups.RemoveFromGroupAsync(connectionId, GroupName);
- }
- catch (Exception ex)
- {
- throw new Exception($"'VersionHub' Remove error : {ex.Message} .", ex.InnerException);
- }
- }
-
- public Task ThrowException() => throw new HubException("This error will be sent to the client!");
-
- #endregion Public Methods
- }
-
- public static class HubProvider
- {
- private const string GroupName = "VersionGroup";
- private const string ReceiveMessageFlag = "ReceiveMessage";
-
- public static async Task SendMessage(this IHubContext hub, string user, string message)
- {
- if (string.IsNullOrWhiteSpace(user) || string.IsNullOrWhiteSpace(message))
- throw new ArgumentNullException($"'VersionHub' The required parameter send message cannot be null !");
-
- try
- {
- var clientParameter = SerializeUtil.Serialize(message);
- await hub.Clients.Groups(GroupName).SendAsync(ReceiveMessageFlag, user, clientParameter);
- }
- catch (Exception ex)
- {
- throw new Exception($"'VersionHub' Send message error : {ex.Message} .", ex.InnerException);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.AspNetCore/Properties/launchSettings.json b/src/c#/GeneralUpdate.AspNetCore/Properties/launchSettings.json
deleted file mode 100644
index 86aa9f96ab0fcb3ef20af74d41e5829a442a56eb..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/Properties/launchSettings.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "profiles": {
- "GeneralUpdate.AspNetCore": {
- "commandName": "Project",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- },
- "applicationUrl": "https://localhost:65355;http://localhost:65363"
- }
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs b/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs
deleted file mode 100644
index d65c71333964f00b4c0d4c6b7bed9f9d35524b6b..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/Services/GeneralUpdateService.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-锘縰sing GeneralUpdate.AspNetCore.DTO;
-using GeneralUpdate.Core.Domain.DTO;
-using GeneralUpdate.Core.Domain.Enum;
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-
-namespace GeneralUpdate.AspNetCore.Services
-{
- public class GeneralUpdateService : IUpdateService
- {
- ///
- /// Update validate.
- ///
- /// 1:ClientApp 2:UpdateApp
- /// The current version number of the client.
- /// The latest version number of the server.
- /// Do you need to force an update.
- /// Each version update (Query the latest version information in the database according to the client version number).
- ///
- public string Update(int clientType, string clientVersion, string serverLastVersion, string clientAppKey, string appSecretKey,
- bool isForce, List versions)
- {
- ParameterVerification(clientType, clientVersion, serverLastVersion, clientAppKey, appSecretKey, versions);
- if (!clientAppKey.Equals(appSecretKey)) throw new Exception("App key does not exist or is incorrect !");
- Version clientLastVersion;
- var respDTO = new VersionRespDTO();
- try
- {
- if (!Version.TryParse(clientVersion, out clientLastVersion))
- {
- respDTO.Message = $"{RespMessage.RequestFailed} Wrong version number.";
- respDTO.Code = HttpStatus.BAD_REQUEST;
- return JsonConvert.SerializeObject(respDTO);
- }
- var lastVersion = new Version(serverLastVersion);
- if (clientLastVersion < lastVersion)
- {
- respDTO.Body = new VersionBodyDTO() { ClientType = clientType, Versions = versions, IsUpdate = true, IsForcibly = isForce };
- respDTO.Code = HttpStatus.OK;
- respDTO.Message = RespMessage.RequestSucceeded;
- }
- else
- {
- respDTO.Body = new VersionBodyDTO() { ClientType = clientType, Versions = versions, IsUpdate = false, IsForcibly = false };
- respDTO.Code = HttpStatus.OK;
- respDTO.Message = RespMessage.RequestNone;
- }
- }
- catch
- {
- respDTO.Message = RespMessage.ServerException;
- respDTO.Code = HttpStatus.SERVICE_UNAVAILABLE;
- }
- return JsonConvert.SerializeObject(respDTO);
- }
-
- private void ParameterVerification(int clientType, string clientVersion, string serverLastVersion, string clientAppkey, string appSecretKey, List versions)
- {
- if (clientType <= 0) throw new Exception(@"'clientType' cannot be less than or equal to 0 !");
- if (string.IsNullOrWhiteSpace(clientVersion)) throw new ArgumentNullException(@"'clientVersion' cannot be null !");
- if (string.IsNullOrWhiteSpace(serverLastVersion)) throw new ArgumentNullException(@"'serverLastVersion' cannot be null !");
- if (versions == null) throw new ArgumentNullException(@"versions cannot be null !");
- if (string.IsNullOrEmpty(clientAppkey) || string.IsNullOrEmpty(appSecretKey)) throw new NullReferenceException("The APP key does not exist !");
- }
-
-
- public string Report(int clientType, string clientVersion, string clientAppkey, string appSecretKey, string meesage, string dumpBase64, string logBase64, Exception exception) => string.Empty;
-
-
- private void ParameterVerification(int clientType, string clientVersion, string clientAppkey, string appSecretKey, string meesage, string dumpBase64, string logBase64, Exception exception) { }
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs b/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs
deleted file mode 100644
index 7e49511e0b371d2ea57b1382098706e90dba1670..0000000000000000000000000000000000000000
--- a/src/c#/GeneralUpdate.AspNetCore/Services/IUpdateService.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-锘縰sing GeneralUpdate.Core.Domain.DTO;
-using System;
-using System.Collections.Generic;
-
-namespace GeneralUpdate.AspNetCore.Services
-{
- public interface IUpdateService
- {
- ///
- /// Verify whether the current version of the client needs to be updated.
- ///
- /// 1:ClientApp 2:UpdateApp
- /// Current version of the client
- /// The latest version of the server.
- /// The appkey agreed by the client and server.
- /// Appkey is stored in the database.
- /// Whether to force all versions to be updated.
- ///
- /// Json object.
- string Update(int clientType, string clientVersion, string serverLastVersion, string clientAppKey, string appSecretKey, bool isForce, List versions);
-
- ///
- /// When this web api is called at the end of the automatic update, it does not mean that every call is successful.
- /// Failure, rollback, and success scenarios will inform the server of the result of the update through this web api.
- /// If there is an exception let the decision maker decide whether to fix the problem by pushing the latest version of the update again.
- ///
- /// 1:ClientApp 2:UpdateApp
- /// Current version of the client.
- /// The appkey agreed by the client and server.
- /// Appkey is stored in the database.
- /// The message from the client is used to describe the current situation to the decision maker.
- /// If an exception occurs, the dump file is returned.
- /// If an exception occurs, the log log is returned
- /// If an exception occurs, the object is returned.
- ///
- string Report(int clientType, string clientVersion, string clientAppkey, string appSecretKey, string meesage, string dumpBase64, string logBase64, Exception exception);
- }
-}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj b/src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj
index 02b2970ff10278dcb097ce4f7b9b4cbc40a59864..94ea81d5b8a99c500de3b09bda23e96227a07b29 100644
--- a/src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj
+++ b/src/c#/GeneralUpdate.Client/GeneralUpdate.Client.csproj
@@ -5,6 +5,7 @@
net8.0
enable
enable
+
diff --git a/src/c#/GeneralUpdate.Client/MySample.cs b/src/c#/GeneralUpdate.Client/MySample.cs
index 6bc123e64c297fe24f696c491bd9e3878f5cc13c..72e631dacad5fabeb9494c7ffee3973810664778 100644
--- a/src/c#/GeneralUpdate.Client/MySample.cs
+++ b/src/c#/GeneralUpdate.Client/MySample.cs
@@ -1,20 +1,16 @@
锘縰sing GeneralUpdate.ClientCore;
using GeneralUpdate.Core.Bootstrap;
+using GeneralUpdate.Core.ContentProvider;
using GeneralUpdate.Core.Domain.Entity;
-using GeneralUpdate.Core.Events.MultiEventArgs;
-using GeneralUpdate.Core.Strategys.PlatformWindows;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using GeneralUpdate.Core.Domain.Enum;
+using GeneralUpdate.Core.Driver;
using GeneralUpdate.Core.Events.CommonArgs;
+using GeneralUpdate.Core.Events.MultiEventArgs;
+using GeneralUpdate.Core.Strategys.PlatformWindows;
+using GeneralUpdate.Core.WillMessage;
using GeneralUpdate.Differential;
-using System.IO;
-using GeneralUpdate.Core.Driver;
-using Microsoft.VisualBasic;
using System.Diagnostics;
+using System.Text;
namespace GeneralUpdate.Client
{
@@ -38,7 +34,7 @@ namespace GeneralUpdate.Client
if (isUpdate) Upgrade();
}
- #endregion
+ #endregion 鎺ㄩ佸姛鑳
#region 甯歌鏇存柊
@@ -211,14 +207,13 @@ namespace GeneralUpdate.Client
private void DispatchMessage(string message)
{
-
}
- #endregion
+ #endregion 甯歌鏇存柊
#region 娴嬭瘯浜岃繘鍒舵洿鏂板寘鏁寸悊
- public async Task TestDifferentialClean()
+ public async Task TestDifferentialClean()
{
var path1 = "D:\\packet\\source";
var path2 = "D:\\packet\\target";
@@ -226,14 +221,14 @@ 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";
await DifferentialCore.Instance.Dirty(path1, path2);
}
- #endregion
+ #endregion 娴嬭瘯浜岃繘鍒舵洿鏂板寘鏁寸悊
#region 娴嬭瘯椹卞姩鍔熻兘
@@ -298,6 +293,54 @@ namespace GeneralUpdate.Client
private bool IsDriverFile(string filePath) =>
string.Equals(Path.GetExtension(filePath), ".inf", StringComparison.OrdinalIgnoreCase);
- #endregion
+ #endregion 娴嬭瘯椹卞姩鍔熻兘
+
+ #region 娴嬭瘯WillMessage
+
+ public void TestWillMessage()
+ {
+ var path1 = "D:\\packet\\source";
+ var path2 = "D:\\packet\\target";
+ var hash = "28d10f1fc2a23dd1afe0af40d132b25c72ea56005963f653c27889f03d381c8d";
+
+ for (int i = 0; i < 1; i++)
+ {
+ var version = "1.0.0." + i;
+ WillMessageManager.Instance.Backup(path1, path2, version, hash, 1);
+ }
+ WillMessageManager.Instance.Builder();
+ var obj = WillMessageManager.Instance.GetWillMessage();
+ WillMessageManager.Instance.Check();
+ WillMessageManager.Instance.Restore();
+ //WillMessageManager.Instance.Clear();
+ }
+
+ #endregion 娴嬭瘯WillMessage
+
+ #region 鏂囦欢绠$悊娴嬭瘯
+
+ public void TestFileProvider()
+ {
+ var sourcePath = "D:\\packet\\source";
+ var targetPath = "D:\\packet\\target";
+ var resultPath = "D:\\packet\\patchs";
+
+ //FileProvider fileProvider = new FileProvider();
+ //var list = fileProvider.ExecuteOperation(sourcePath, targetPath,new List(), new List());
+ //foreach (var item in list) {
+ // Console.WriteLine(item);
+ //}
+ //Console.WriteLine("total" + list.Count());
+ //Console.WriteLine("--------------------------------------");
+ //FileProvider fileProvider1 = new FileProvider();
+ //var list1 = fileProvider1.ExecuteOperation(targetPath, sourcePath, new List(), new List());
+ //foreach (var item in list1)
+ //{
+ // Console.WriteLine(item);
+ //}
+ //Console.WriteLine("total" + list1.Count());
+ }
+
+ #endregion 鏂囦欢绠$悊娴嬭瘯
}
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Client/Program.cs b/src/c#/GeneralUpdate.Client/Program.cs
index 99480e10585b091829fbb35cf7bf2fdddfc2dd87..1b9dd51c972a8f7125b322c96aa9cb064d97f72a 100644
--- a/src/c#/GeneralUpdate.Client/Program.cs
+++ b/src/c#/GeneralUpdate.Client/Program.cs
@@ -1,28 +1,28 @@
-锘縰sing GeneralUpdate.Core.HashAlgorithms;
-
-namespace GeneralUpdate.Client
+锘縩amespace GeneralUpdate.Client
{
internal class Program
{
- static void Main(string[] args)
+ private static void Main(string[] args)
{
- Task.Run(async() =>
- {
- //415eed05eb310f480d1e4d15516fa00e484ddb9f416908b217f17b782ded2030
- //var zip1 = @"D:\github_project\WpfClient\WebApi\UpdateFiles\WpfClient_1_24.1.5.1218.zip";
- //94bd3d806d39cd1b8813298ec0637c7f377658e766845a06cc50917306cb4ad9
- //var zip2 = @"D:\github_project\WpfClient\WebApi\UpdateFiles\WpfClient_1_24.1.5.1224.zip";
+ MySample sample = new MySample();
+ sample.TestFileProvider();
+ //Task.Run(async() =>
+ //{
+ // //415eed05eb310f480d1e4d15516fa00e484ddb9f416908b217f17b782ded2030
+ // //var zip1 = @"D:\github_project\WpfClient\WebApi\UpdateFiles\WpfClient_1_24.1.5.1218.zip";
+ // //94bd3d806d39cd1b8813298ec0637c7f377658e766845a06cc50917306cb4ad9
+ // //var zip2 = @"D:\github_project\WpfClient\WebApi\UpdateFiles\WpfClient_1_24.1.5.1224.zip";
- //var hashAlgorithm = new Sha256HashAlgorithm();
- //var hashSha256 = hashAlgorithm.ComputeHash(zip1);
- //var hashSha2561 = hashAlgorithm.ComputeHash(zip2);
+ // //var hashAlgorithm = new Sha256HashAlgorithm();
+ // //var hashSha256 = hashAlgorithm.ComputeHash(zip1);
+ // //var hashSha2561 = hashAlgorithm.ComputeHash(zip2);
- MySample sample = new MySample();
- //await sample.TestDifferentialClean();
- //await sample.TestDifferentialDirty();
- await sample.Upgrade();
- });
+ // MySample sample = new MySample();
+ // //await sample.TestDifferentialClean();
+ // //await sample.TestDifferentialDirty();
+ // await sample.Upgrade();
+ //});
Console.Read();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
index d5d74d58739a3b2fa09bcb215c62fd7c953b391d..da7872627b303c1089ca85909e86cd68dcaae5c2 100644
--- a/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
+++ b/src/c#/GeneralUpdate.ClientCore/GeneralClientBootstrap.cs
@@ -158,7 +158,7 @@ namespace GeneralUpdate.ClientCore
}
///
- /// Add an asynchronous custom operation.
+ /// Add an asynchronous custom operation.
/// In theory, any custom operation can be done. It is recommended to register the environment check method to ensure that there are normal dependencies and environments after the update is completed.
///
///
@@ -172,7 +172,7 @@ namespace GeneralUpdate.ClientCore
}
///
- /// Add a synchronization custom operation.
+ /// Add a synchronization custom operation.
/// In theory, any custom operation can be done. It is recommended to register the environment check method to ensure that there are normal dependencies and environments after the update is completed.
///
///
@@ -223,10 +223,10 @@ namespace GeneralUpdate.ClientCore
}
///
- /// Performs all injected custom operations.
+ /// 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..c08f1e5744710b81d59c0769b7dc074fae94a510 100644
--- a/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs
+++ b/src/c#/GeneralUpdate.ClientCore/GeneralClientOSS.cs
@@ -1,7 +1,7 @@
-锘縰sing GeneralUpdate.Core.Domain.Entity;
+锘縰sing GeneralUpdate.Core.ContentProvider;
+using GeneralUpdate.Core.Domain.Entity;
using GeneralUpdate.Core.Domain.Entity.Assembler;
using GeneralUpdate.Core.Domain.PO;
-using GeneralUpdate.Core.Utils;
using System;
using System.Collections.Generic;
using System.Diagnostics;
@@ -32,7 +32,7 @@ namespace GeneralUpdate.ClientCore
var versionsFilePath = Path.Combine(basePath, configParams.VersionFileName);
DownloadFile(configParams.Url + "/" + configParams.VersionFileName, versionsFilePath);
if (!File.Exists(versionsFilePath)) return;
- var versions = FileUtil.GetJson>(versionsFilePath);
+ var versions = FileProvider.GetJson>(versionsFilePath);
if (versions == null || versions.Count == 0) return;
versions = versions.OrderByDescending(x => x.PubTime).ToList();
var newVersion = versions.First();
@@ -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..de6d08b8b4db4e9e2a7dad137a7a1f35c373b269 100644
--- a/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
+++ b/src/c#/GeneralUpdate.ClientCore/GeneralUpdate.ClientCore.csproj
@@ -32,7 +32,6 @@
-
@@ -62,9 +61,9 @@
-
+
@@ -75,6 +74,13 @@
+
+
+
+
+
+
+
@@ -150,17 +156,11 @@
-
-
-
-
-
-
@@ -171,9 +171,6 @@
-
-
-
@@ -203,19 +200,14 @@
-
-
-
-
-
@@ -244,10 +236,8 @@
-
-
diff --git a/src/c#/GeneralUpdate.AspNetCore/Utils/.gitkeep b/src/c#/GeneralUpdate.ClientCore/WillMessage/.gitkeep
similarity index 100%
rename from src/c#/GeneralUpdate.AspNetCore/Utils/.gitkeep
rename to src/c#/GeneralUpdate.ClientCore/WillMessage/.gitkeep
diff --git a/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs b/src/c#/GeneralUpdate.Core/Bootstrap/AbstractBootstrap.cs
index 9b45207b8c84b9b0beb2f1ad5d27afc0d61cc9c9..081f6ecf9f2beced84a4bd46f79bc2c1144b0a5b 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;
+锘縰sing GeneralUpdate.Core.ContentProvider;
+using GeneralUpdate.Core.Domain.Entity;
using GeneralUpdate.Core.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 System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -62,7 +62,7 @@ namespace GeneralUpdate.Core.Bootstrap
Packet.Encoding = GetOption(UpdateOption.Encoding) ?? Encoding.Default;
Packet.DownloadTimeOut = GetOption(UpdateOption.DownloadTimeOut);
Packet.AppName = $"{Packet.AppName ?? GetOption(UpdateOption.MainApp)}{EXECUTABLE_FILE}";
- Packet.TempPath = $"{FileUtil.GetTempDirectory(Packet.LastVersion)}{Path.DirectorySeparatorChar}";
+ Packet.TempPath = $"{FileProvider.GetTempDirectory(Packet.LastVersion)}{Path.DirectorySeparatorChar}";
Packet.DriveEnabled = GetOption(UpdateOption.Drive) ?? false;
Packet.WillMessageEnabled = GetOption(UpdateOption.WillMessage) ?? false;
var manager = new DownloadManager(Packet.TempPath, Packet.Format, Packet.DownloadTimeOut);
@@ -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
+
diff --git a/src/c#/GeneralUpdate.ClientCore/Strategys/PlatformMac/.gitkeep b/src/c#/GeneralUpdate.Maui.OSS/ContentProvider/.gitkeep
similarity index 100%
rename from src/c#/GeneralUpdate.ClientCore/Strategys/PlatformMac/.gitkeep
rename to src/c#/GeneralUpdate.Maui.OSS/ContentProvider/.gitkeep
diff --git a/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdate.Maui.OSS.csproj b/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdate.Maui.OSS.csproj
index f150deb23484f61a9c75d735f210ae68a0470cc1..fde0276d1c3d49a8e44a193339cd9413bbd91e23 100644
--- a/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdate.Maui.OSS.csproj
+++ b/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdate.Maui.OSS.csproj
@@ -43,13 +43,20 @@
+
-
+
+
+
+
+
+
+
@@ -66,7 +73,6 @@
-
@@ -74,7 +80,6 @@
-
diff --git a/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdateOSS.cs b/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdateOSS.cs
index 795eead6fa73baaf616bada729ddf88e37e374de..5523a4f53e21a45103ebf80a8b2c0165206617ac 100644
--- a/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdateOSS.cs
+++ b/src/c#/GeneralUpdate.Maui.OSS/GeneralUpdateOSS.cs
@@ -16,7 +16,7 @@ namespace GeneralUpdate.Maui.OSS
private GeneralUpdateOSS()
{ }
- #endregion
+ #endregion Constructors
#region Public Methods
@@ -53,7 +53,7 @@ namespace GeneralUpdate.Maui.OSS
AddListener(callbackAction);
}
- #endregion
+ #endregion Public Methods
#region Private Methods
@@ -78,6 +78,6 @@ namespace GeneralUpdate.Maui.OSS
if (callbackAction != null) EventManager.Instance.AddListener(callbackAction);
}
- #endregion
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Maui.OSS/Platforms/Android/AndroidManifest.xml b/src/c#/GeneralUpdate.Maui.OSS/Platforms/Android/AndroidManifest.xml
index f9b832e45b60234f9733c93f5bdeb12b97ef5706..b0f2e2a3e219b720565d77ce3f3a94d3e6f21514 100644
--- a/src/c#/GeneralUpdate.Maui.OSS/Platforms/Android/AndroidManifest.xml
+++ b/src/c#/GeneralUpdate.Maui.OSS/Platforms/Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘
-
+
-
+
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.OSSClient/AppShell.xaml b/src/c#/GeneralUpdate.OSSClient/AppShell.xaml
index c766f29d5907ac7e0674e6b13e2eea128e0e3089..05b5b0518e0253a07995dc9118a7900e8d2673e1 100644
--- a/src/c#/GeneralUpdate.OSSClient/AppShell.xaml
+++ b/src/c#/GeneralUpdate.OSSClient/AppShell.xaml
@@ -10,5 +10,4 @@
Title="Home"
ContentTemplate="{DataTemplate local:MainPage}"
Route="MainPage" />
-
-
+
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.OSSClient/MainPage.xaml b/src/c#/GeneralUpdate.OSSClient/MainPage.xaml
index a5fd5afc5fc76bd19a9907a0392a5b2e662b609f..636a0e891d0b3632d4077438325c57c1826191b9 100644
--- a/src/c#/GeneralUpdate.OSSClient/MainPage.xaml
+++ b/src/c#/GeneralUpdate.OSSClient/MainPage.xaml
@@ -34,8 +34,6 @@
SemanticProperties.Hint="Counts the number of times you click"
Clicked="OnCounterClicked"
HorizontalOptions="Center" />
-
-
-
+
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.OSSClient/MauiProgram.cs b/src/c#/GeneralUpdate.OSSClient/MauiProgram.cs
index 87aa782e67aa71ff89019d716a891c3895c964da..49737cd8a6ee1ca61cccb890c628b4e460224416 100644
--- a/src/c#/GeneralUpdate.OSSClient/MauiProgram.cs
+++ b/src/c#/GeneralUpdate.OSSClient/MauiProgram.cs
@@ -16,7 +16,7 @@ namespace GeneralUpdate.OSSClient
});
#if DEBUG
- builder.Logging.AddDebug();
+ builder.Logging.AddDebug();
#endif
return builder.Build();
diff --git a/src/c#/GeneralUpdate.OSSClient/Platforms/Android/MainActivity.cs b/src/c#/GeneralUpdate.OSSClient/Platforms/Android/MainActivity.cs
index 9e45c1cbe0199a9c36d431d9be3c6044a894c211..00f343bcaa2bfb9f81476acd13db868de9542f7e 100644
--- a/src/c#/GeneralUpdate.OSSClient/Platforms/Android/MainActivity.cs
+++ b/src/c#/GeneralUpdate.OSSClient/Platforms/Android/MainActivity.cs
@@ -1,6 +1,5 @@
锘縰sing Android.App;
using Android.Content.PM;
-using Android.OS;
namespace GeneralUpdate.OSSClient
{
diff --git a/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Colors.xaml b/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Colors.xaml
index 245758ba179319c7248201d70f956d9c2527982b..3f82da216a7e621c4f4971545cb19248e33df9a0 100644
--- a/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Colors.xaml
+++ b/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Colors.xaml
@@ -1,6 +1,6 @@
锘
-
@@ -17,19 +17,19 @@
#404040
#212121
#141414
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
#F7B548
#FFD590
@@ -40,5 +40,4 @@
#3E8EED
#72ACF1
#A7CBF6
-
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Styles.xaml b/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Styles.xaml
index dc4a03475b51cc49102b46b661373ffc04f7abe4..152a2fef6f2e979661ceb87826c33d84f7c862f6 100644
--- a/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Styles.xaml
+++ b/src/c#/GeneralUpdate.OSSClient/Resources/Styles/Styles.xaml
@@ -1,6 +1,6 @@
锘
-
@@ -9,14 +9,14 @@
@@ -401,5 +401,4 @@
-
-
+
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Maui.OSS/Utils/.gitkeep b/src/c#/GeneralUpdate.SystemService/ContentProvider/.gitkeep
similarity index 100%
rename from src/c#/GeneralUpdate.Maui.OSS/Utils/.gitkeep
rename to src/c#/GeneralUpdate.SystemService/ContentProvider/.gitkeep
diff --git a/src/c#/GeneralUpdate.SystemService/Domain/DTO/Assembler/.gitkeep b/src/c#/GeneralUpdate.SystemService/Domain/DTO/Assembler/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/Domain/Entity/Assembler/.gitkeep b/src/c#/GeneralUpdate.SystemService/Domain/Entity/Assembler/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/Exceptions/CustomArgs/.gitkeep b/src/c#/GeneralUpdate.SystemService/Exceptions/CustomArgs/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/Exceptions/CustomException/.gitkeep b/src/c#/GeneralUpdate.SystemService/Exceptions/CustomException/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj b/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj
index 3bd060bd1d58a73e871f2ebfa59d8fe262918a77..5018bdeed9c04b64971760d989317cb60fe43ae4 100644
--- a/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj
+++ b/src/c#/GeneralUpdate.SystemService/GeneralUpdate.SystemService.csproj
@@ -8,13 +8,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -22,4 +57,9 @@
+
+
+
+
+
diff --git a/src/c#/GeneralUpdate.SystemService/HashAlgorithms/.gitkeep b/src/c#/GeneralUpdate.SystemService/HashAlgorithms/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/Properties/launchSettings.json b/src/c#/GeneralUpdate.SystemService/Properties/launchSettings.json
index ab9db06fa0d92187e7f4e1ab8988c61b9e2af1a6..fe8baafcc9a7073a9b90370b573696f84e9fb75a 100644
--- a/src/c#/GeneralUpdate.SystemService/Properties/launchSettings.json
+++ b/src/c#/GeneralUpdate.SystemService/Properties/launchSettings.json
@@ -9,4 +9,4 @@
}
}
}
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.SystemService/Services/WillMessageService.cs b/src/c#/GeneralUpdate.SystemService/Services/WillMessageService.cs
index cc9c554c429756450a2bbc1c813b4952670b2dfd..3aed374629226f1f9f146153b52ef0b1bd0a129b 100644
--- a/src/c#/GeneralUpdate.SystemService/Services/WillMessageService.cs
+++ b/src/c#/GeneralUpdate.SystemService/Services/WillMessageService.cs
@@ -1,5 +1,6 @@
锘縰sing GeneralUpdate.Core.WillMessage;
using System.Diagnostics;
+
#if WINDOWS
using System.Runtime.InteropServices;
#endif
@@ -21,17 +22,17 @@ namespace GeneralUpdate.SystemService.Services
private FileSystemWatcher _fileWatcher;
private ILogger _logger;
-#endregion
+ #endregion Private Members
#region Constructors
- public WillMessageService(IConfiguration configuration, ILogger logger)
+ public WillMessageService(IConfiguration configuration, ILogger logger)
{
_path = configuration.GetValue("WatcherPath");
_logger = logger;
}
- #endregion
+ #endregion Constructors
#region Public Methods
@@ -56,7 +57,7 @@ namespace GeneralUpdate.SystemService.Services
_logger.LogInformation("File watcher executed.");
stoppingToken.Register(() => OnStopping());
_fileWatcher = new FileSystemWatcher(_path);
- // Watch for changes in LastAccess and LastWrite times, and the renaming of files or directories.
+ // Watch for changes in LastAccess and LastWrite times, and the renaming of files or directories.
_fileWatcher.NotifyFilter = NotifyFilters.LastWrite;
// Only watch text files.
_fileWatcher.Filter = "*.*";
@@ -84,11 +85,11 @@ namespace GeneralUpdate.SystemService.Services
return base.StopAsync(cancellationToken);
}
- #endregion
+ #endregion Public Methods
#region Private Methods
- private void OnChanged(object sender, FileSystemEventArgs e)
+ private void OnChanged(object sender, FileSystemEventArgs e)
{
try
{
@@ -116,7 +117,7 @@ namespace GeneralUpdate.SystemService.Services
}
}
- private void Diagnosis(string processName)
+ private void Diagnosis(string processName)
{
try
{
@@ -140,6 +141,6 @@ namespace GeneralUpdate.SystemService.Services
}
}
-#endregion
+ #endregion Private Methods
}
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.SystemService/Utrils/.gitkeep b/src/c#/GeneralUpdate.SystemService/Utrils/.gitkeep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/src/c#/GeneralUpdate.SystemService/appsettings.Development.json b/src/c#/GeneralUpdate.SystemService/appsettings.Development.json
index b2dcdb67421cdf46236defda1c6fbf1d9eead5ee..07c8e4cc680fa2b051873422be097f9f5385cd16 100644
--- a/src/c#/GeneralUpdate.SystemService/appsettings.Development.json
+++ b/src/c#/GeneralUpdate.SystemService/appsettings.Development.json
@@ -5,4 +5,4 @@
"Microsoft.Hosting.Lifetime": "Information"
}
}
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.SystemService/appsettings.json b/src/c#/GeneralUpdate.SystemService/appsettings.json
index 1ac231fab880fe7f8109ba14d53b609731d81aba..27023230ed39dd36f97cbe4ec5d2dccdd11ab51a 100644
--- a/src/c#/GeneralUpdate.SystemService/appsettings.json
+++ b/src/c#/GeneralUpdate.SystemService/appsettings.json
@@ -6,4 +6,4 @@
}
},
"WatcherPath": "C:\\generalupdate_willmessage"
-}
+}
\ No newline at end of file
diff --git a/src/c#/GeneralUpdate.Upgrad/Program.cs b/src/c#/GeneralUpdate.Upgrad/Program.cs
index 0a9e88af83c568c01d740fc87e3d3b33a2f8fd62..ac3952d242901f7d19098c54c041cb154691b774 100644
--- a/src/c#/GeneralUpdate.Upgrad/Program.cs
+++ b/src/c#/GeneralUpdate.Upgrad/Program.cs
@@ -1,10 +1,8 @@
锘縰sing GeneralUpdate.Core;
using GeneralUpdate.Core.Bootstrap;
-using GeneralUpdate.Core.Domain.Entity;
using GeneralUpdate.Core.Domain.Enum;
using GeneralUpdate.Core.Events.CommonArgs;
using GeneralUpdate.Core.Events.MultiEventArgs;
-using GeneralUpdate.Core.Strategys;
using GeneralUpdate.Core.Strategys.PlatformWindows;
using System.Text;
diff --git a/src/c#/GeneralUpdate.sln b/src/c#/GeneralUpdate.sln
index b42f9e2365d2939c1abbfd6d7822e41f7d7e6298..0bcd9f746d5a22357b24f0e7ee4943f4410ed100 100644
--- a/src/c#/GeneralUpdate.sln
+++ b/src/c#/GeneralUpdate.sln
@@ -11,16 +11,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeneralUpdate.Single", "Gen
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.Zip", "GeneralUpdate.Zip\GeneralUpdate.Zip.csproj", "{D94882E1-55A7-4787-B049-265F52DC576E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.AspNetCore", "GeneralUpdate.AspNetCore\GeneralUpdate.AspNetCore.csproj", "{7D529953-3846-485F-AC71-3EEACB9161EC}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.ClientCore", "GeneralUpdate.ClientCore\GeneralUpdate.ClientCore.csproj", "{BAEFF926-6B2C-46F1-BB73-AA2AB1355565}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.Differential", "GeneralUpdate.Differential\GeneralUpdate.Differential.csproj", "{40BDA496-7614-4213-92D0-3B1B187675D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{74BE0282-A10D-4A81-A0F0-FAA79A6152B7}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.Api", "GeneralUpdate.Api\GeneralUpdate.Api.csproj", "{AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.Upgrad", "GeneralUpdate.Upgrad\GeneralUpdate.Upgrad.csproj", "{E1F9FF93-CA63-4A9C-82F0-450F09ED81F9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeneralUpdate.Maui.OSS", "GeneralUpdate.Maui.OSS\GeneralUpdate.Maui.OSS.csproj", "{C4BDA544-2A6E-442C-B7D0-32CD7A996933}"
@@ -49,10 +45,6 @@ Global
{D94882E1-55A7-4787-B049-265F52DC576E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D94882E1-55A7-4787-B049-265F52DC576E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D94882E1-55A7-4787-B049-265F52DC576E}.Release|Any CPU.Build.0 = Release|Any CPU
- {7D529953-3846-485F-AC71-3EEACB9161EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7D529953-3846-485F-AC71-3EEACB9161EC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7D529953-3846-485F-AC71-3EEACB9161EC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7D529953-3846-485F-AC71-3EEACB9161EC}.Release|Any CPU.Build.0 = Release|Any CPU
{BAEFF926-6B2C-46F1-BB73-AA2AB1355565}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BAEFF926-6B2C-46F1-BB73-AA2AB1355565}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BAEFF926-6B2C-46F1-BB73-AA2AB1355565}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -61,10 +53,6 @@ Global
{40BDA496-7614-4213-92D0-3B1B187675D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{40BDA496-7614-4213-92D0-3B1B187675D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{40BDA496-7614-4213-92D0-3B1B187675D3}.Release|Any CPU.Build.0 = Release|Any CPU
- {AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20}.Release|Any CPU.Build.0 = Release|Any CPU
{E1F9FF93-CA63-4A9C-82F0-450F09ED81F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E1F9FF93-CA63-4A9C-82F0-450F09ED81F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E1F9FF93-CA63-4A9C-82F0-450F09ED81F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -95,10 +83,8 @@ Global
{35BFF228-5EE4-49A6-B721-FB0122E967A0} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
{57300FDD-58E9-489E-BF2E-C69A87938845} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
{D94882E1-55A7-4787-B049-265F52DC576E} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
- {7D529953-3846-485F-AC71-3EEACB9161EC} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
{BAEFF926-6B2C-46F1-BB73-AA2AB1355565} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
{40BDA496-7614-4213-92D0-3B1B187675D3} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
- {AE3E4ADF-CE3B-4E94-B1BE-F0B9916B7F20} = {74BE0282-A10D-4A81-A0F0-FAA79A6152B7}
{E1F9FF93-CA63-4A9C-82F0-450F09ED81F9} = {74BE0282-A10D-4A81-A0F0-FAA79A6152B7}
{C4BDA544-2A6E-442C-B7D0-32CD7A996933} = {91F059E6-7AD3-4FB7-9604-30A7849C6EFF}
{2877DCA1-7EA6-42E9-A1C2-399B51E24893} = {74BE0282-A10D-4A81-A0F0-FAA79A6152B7}