Refactor Utils

This commit is contained in:
2dust
2024-10-14 10:42:05 +08:00
parent 4eb443e547
commit 6b99b7eec5
19 changed files with 160 additions and 265 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ namespace ServiceLib.Services
_updateFunc?.Invoke(false, args.Msg);
url = args.Url;
fileName = Utils.GetTempPath(Utils.GetGUID());
fileName = Utils.GetTempPath(Utils.GetGuid());
await downloadHandle.DownloadFileAsync(url, fileName, true, _timeout);
}
else
@@ -108,7 +108,7 @@ namespace ServiceLib.Services
url = args.Url;
var ext = Path.GetExtension(url);
fileName = Utils.GetTempPath(Utils.GetGUID() + ext);
fileName = Utils.GetTempPath(Utils.GetGuid() + ext);
await downloadHandle.DownloadFileAsync(url, fileName, true, _timeout);
}
else
@@ -451,7 +451,7 @@ namespace ServiceLib.Services
_config = config;
_updateFunc = updateFunc;
var url = string.Format(Global.GeoUrl, geoName);
var fileName = Utils.GetTempPath(Utils.GetGUID());
var fileName = Utils.GetTempPath(Utils.GetGuid());
DownloadService downloadHandle = new();
downloadHandle.UpdateCompleted += (sender2, args) =>