Code clean

This commit is contained in:
2dust
2025-01-30 17:10:05 +08:00
parent 253219dd16
commit 45264005a4
103 changed files with 639 additions and 498 deletions
@@ -1,7 +1,7 @@
using ReactiveUI;
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;
using ReactiveUI;
namespace ServiceLib.Services
{
@@ -119,7 +119,8 @@ namespace ServiceLib.Services
private void ExitLoop(string x)
{
if (_exitLoop) return;
if (_exitLoop)
return;
_exitLoop = true;
UpdateFunc("", ResUI.SpeedtestingStop);
}
@@ -261,7 +262,8 @@ namespace ServiceLib.Services
UpdateFunc(it.IndexId, "", ResUI.Speedtesting);
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
if (item is null) continue;
if (item is null)
continue;
var webProxy = new WebProxy($"socks5://{Global.Loopback}:{it.Port}");
@@ -323,7 +325,8 @@ namespace ServiceLib.Services
UpdateFunc(it.IndexId, "", ResUI.Speedtesting);
var item = await AppHandler.Instance.GetProfileItem(it.IndexId);
if (item is null) continue;
if (item is null)
continue;
var webProxy = new WebProxy($"socks5://{Global.Loopback}:{it.Port}");
_ = downloadHandle.DownloadDataAsync(url, webProxy, timeout, (success, msg) =>
@@ -405,4 +408,4 @@ namespace ServiceLib.Services
_updateFunc?.Invoke(new() { IndexId = indexId, Delay = delay, Speed = speed });
}
}
}
}