csharp_style_namespace_declarations = file_scoped

This commit is contained in:
2dust 2025-04-02 11:44:23 +08:00
parent d92540121f
commit 4d3db56065
186 changed files with 23574 additions and 23759 deletions

View file

@ -1,5 +1,5 @@
namespace AmazTool
{
namespace AmazTool;
internal static class Program
{
[STAThread]
@ -23,4 +23,3 @@ namespace AmazTool
UpgradeApp.Upgrade(argData);
}
}
}

View file

@ -2,8 +2,8 @@ using System.Diagnostics;
using System.IO.Compression;
using System.Text;
namespace AmazTool
{
namespace AmazTool;
internal class UpgradeApp
{
public static void Upgrade(string fileName)
@ -114,4 +114,3 @@ namespace AmazTool
Utils.StartV2RayN();
}
}
}

View file

@ -1,7 +1,7 @@
using System.Diagnostics;
namespace AmazTool
{
namespace AmazTool;
internal class Utils
{
public static string GetExePath()
@ -49,4 +49,3 @@ namespace AmazTool
}
}
}
}

View file

@ -8,7 +8,7 @@
<TargetFramework>net8.0</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<NoWarn>CA1031;CS1591;NU1507;CA1416</NoWarn>
<NoWarn>CA1031;CS1591;NU1507;CA1416;IDE0058</NoWarn>
<Nullable>annotations</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>2dust</Authors>

View file

@ -1,10 +1,9 @@
using ReactiveUI;
using ReactiveUI;
namespace ServiceLib.Base;
namespace ServiceLib.Base
{
public class MyReactiveObject : ReactiveObject
{
protected static Config? _config;
protected Func<EViewAction, object?, Task<bool>>? _updateView;
}
}

View file

@ -1,8 +1,8 @@
using System.Security.Cryptography;
using System.Text;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class AesUtils
{
private const int KeySize = 256; // AES-256
@ -98,4 +98,3 @@ namespace ServiceLib.Common
return randomNumber;
}
}
}

View file

@ -1,8 +1,8 @@
using System.Security.Cryptography;
using System.Text;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class DesUtils
{
/// <summary>
@ -72,4 +72,3 @@ namespace ServiceLib.Common
return Utils.GetMd5(Utils.GetHomePath() + "DesUtils");
}
}
}

View file

@ -1,8 +1,8 @@
using System.Net;
using Downloader;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class DownloaderHelper
{
private static readonly Lazy<DownloaderHelper> _instance = new(() => new());
@ -178,4 +178,3 @@ namespace ServiceLib.Common
downloadOpt = null;
}
}
}

View file

@ -2,8 +2,8 @@ using System.Formats.Tar;
using System.IO.Compression;
using System.Text;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public static class FileManager
{
private static readonly string _tag = "FileManager";
@ -224,4 +224,3 @@ namespace ServiceLib.Common
}
}
}
}

View file

@ -2,8 +2,8 @@ using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
/// <summary>
/// </summary>
public class HttpClientHelper
@ -203,4 +203,3 @@ namespace ServiceLib.Common
} while (isMoreToRead);
}
}
}

View file

@ -1,8 +1,7 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
/*
* See:
* http://stackoverflow.com/questions/6266820/working-example-of-createjobobject-setinformationjobobject-pinvoke-in-net
@ -178,4 +177,4 @@ namespace ServiceLib.Common
}
#endregion Helper classes
}

View file

@ -1,9 +1,9 @@
using System.Text.Json;
using System.Text.Json;
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class JsonUtils
{
private static readonly string _tag = "JsonUtils";
@ -128,4 +128,3 @@ namespace ServiceLib.Common
/// <returns></returns>
public static JsonNode? SerializeToNode(object? obj) => JsonSerializer.SerializeToNode(obj);
}
}

View file

@ -2,10 +2,13 @@ using NLog;
using NLog.Config;
using NLog.Targets;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class Logging
{
private static readonly Logger _logger1 = LogManager.GetLogger("Log1");
private static readonly Logger _logger2 = LogManager.GetLogger("Log2");
public static void Setup()
{
LoggingConfiguration config = new();
@ -32,7 +35,7 @@ namespace ServiceLib.Common
return;
}
LogManager.GetLogger("Log1").Info(strContent);
_logger1.Info(strContent);
}
public static void SaveLog(string strTitle, Exception ex)
@ -42,13 +45,11 @@ namespace ServiceLib.Common
return;
}
var logger = LogManager.GetLogger("Log2");
logger.Debug($"{strTitle},{ex.Message}");
logger.Debug(ex.StackTrace);
_logger2.Debug($"{strTitle},{ex.Message}");
_logger2.Debug(ex.StackTrace);
if (ex?.InnerException != null)
{
logger.Error(ex.InnerException);
}
_logger2.Error(ex.InnerException);
}
}
}

View file

@ -1,9 +1,9 @@
using QRCoder;
using QRCoder;
using SkiaSharp;
using ZXing.SkiaSharp;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class QRCodeHelper
{
public static byte[]? GenQRCode(string? url)
@ -87,4 +87,3 @@ namespace ServiceLib.Common
return flipped;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class SemanticVersion
{
private readonly int major;
@ -184,4 +184,3 @@ namespace ServiceLib.Common
#endregion Private
}
}

View file

@ -1,8 +1,8 @@
using System.Collections;
using SQLite;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public sealed class SQLiteHelper
{
private static readonly Lazy<SQLiteHelper> _instance = new(() => new());
@ -88,4 +88,3 @@ namespace ServiceLib.Common
});
}
}
}

View file

@ -1,7 +1,7 @@
using System.Diagnostics.CodeAnalysis;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public static class StringEx
{
public static bool IsNullOrEmpty([NotNullWhen(false)] this string? value)
@ -80,4 +80,3 @@ namespace ServiceLib.Common
return int.TryParse(value, out var result) ? result : defaultValue;
}
}
}

View file

@ -11,8 +11,8 @@ using System.Text;
using CliWrap;
using CliWrap.Buffered;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class Utils
{
private static readonly string _tag = "Utils";
@ -863,4 +863,3 @@ namespace ServiceLib.Common
#endregion Platform
}
}

View file

@ -2,8 +2,8 @@ using System.Security.Cryptography;
using System.Text;
using Microsoft.Win32;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
internal static class WindowsUtils
{
private static readonly string _tag = "WindowsUtils";
@ -71,4 +71,3 @@ namespace ServiceLib.Common
}
}
}
}

View file

@ -2,8 +2,8 @@ using YamlDotNet.Core;
using YamlDotNet.Serialization;
using YamlDotNet.Serialization.NamingConventions;
namespace ServiceLib.Common
{
namespace ServiceLib.Common;
public class YamlUtils
{
private static readonly string _tag = "YamlUtils";
@ -77,4 +77,3 @@ namespace ServiceLib.Common
#endregion YAML
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EConfigType
{
VMess = 1,
@ -13,4 +13,3 @@
WireGuard = 9,
HTTP = 10
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ECoreType
{
v2fly = 1,
@ -16,4 +16,3 @@ namespace ServiceLib.Enums
overtls = 28,
v2rayN = 99
}
}

View file

@ -1,9 +1,8 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EGirdOrientation
{
Horizontal,
Vertical,
Tab,
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EGlobalHotkey
{
ShowForm = 0,
@ -8,4 +8,3 @@
SystemProxyUnchanged = 3,
SystemProxyPac = 4,
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EInboundProtocol
{
socks = 0,
@ -11,4 +11,3 @@
mixed,
speedtest = 21
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EMove
{
Top = 1,
@ -8,4 +8,3 @@
Bottom = 4,
Position = 5
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EMsgCommand
{
ClearMsg,
@ -8,4 +8,3 @@ namespace ServiceLib.Enums
RefreshProfiles,
AppExit
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EMultipleLoad
{
Random,
@ -7,4 +7,3 @@ namespace ServiceLib.Enums
LeastPing,
LeastLoad
}
}

View file

@ -1,9 +1,8 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EPresetType
{
Default = 0,
Russia = 1,
Iran = 2,
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ERuleMode
{
Rule = 0,
@ -7,4 +7,3 @@
Direct = 2,
Unchanged = 3
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EServerColName
{
Def = 0,
@ -18,4 +18,3 @@
TotalDown,
TotalUp
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ESpeedActionType
{
Tcping,
@ -7,4 +7,3 @@
Speedtest,
Mixedtest
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ESysProxyType
{
ForcedClear = 0,
@ -7,4 +7,3 @@
Unchanged = 2,
Pac = 3
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ETheme
{
FollowSystem,
@ -10,4 +10,3 @@
Dusk,
NightSky
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum ETransport
{
tcp,
@ -12,4 +12,3 @@
quic,
grpc
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Enums
{
namespace ServiceLib.Enums;
public enum EViewAction
{
CloseWindow,
@ -43,4 +43,3 @@
DispatcherCheckUpdateFinished,
DispatcherShowMsg,
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib
{
namespace ServiceLib;
public class Global
{
#region const
@ -521,4 +521,3 @@ namespace ServiceLib
#endregion const
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public sealed class AppHandler
{
#region Property
@ -241,4 +241,3 @@ namespace ServiceLib.Handler
#endregion Core Type
}
}

View file

@ -1,8 +1,8 @@
using System.Security.Principal;
using System.Text.RegularExpressions;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public static class AutoStartupHandler
{
private static readonly string _tag = "AutoStartupHandler";
@ -239,4 +239,3 @@ namespace ServiceLib.Handler
#endregion macOS
}
}

View file

@ -1,7 +1,7 @@
using static ServiceLib.Models.ClashProxies;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public sealed class ClashApiHandler
{
private static readonly Lazy<ClashApiHandler> instance = new(() => new());
@ -185,4 +185,3 @@ namespace ServiceLib.Handler
return $"{Global.HttpProtocol}{Global.Loopback}:{AppHandler.Instance.StatePort2}";
}
}
}

View file

@ -1,8 +1,8 @@
using System.Data;
using System.Text.RegularExpressions;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
/// <summary>
/// 本软件配置文件处理类
/// </summary>
@ -1923,4 +1923,3 @@ namespace ServiceLib.Handler
#endregion Regional Presets
}
}

View file

@ -1,9 +1,5 @@
using DynamicData;
using ServiceLib.Enums;
using ServiceLib.Models;
namespace ServiceLib.Handler;
namespace ServiceLib.Handler
{
/// <summary>
/// Core configuration file processing class
/// </summary>
@ -157,4 +153,3 @@ namespace ServiceLib.Handler
return result;
}
}
}

View file

@ -1,8 +1,8 @@
using System.Diagnostics;
using System.Text;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
/// <summary>
/// Core process processing class
/// </summary>
@ -407,4 +407,3 @@ namespace ServiceLib.Handler
#endregion Linux
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public sealed class CoreInfoHandler
{
private static readonly Lazy<CoreInfoHandler> _instance = new(() => new());
@ -215,4 +215,3 @@ namespace ServiceLib.Handler
return $"{Global.GithubUrl}/{Global.CoreUrls[eCoreType]}/releases";
}
}
}

View file

@ -1,7 +1,7 @@
using System.Collections.Specialized;
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class BaseFmt
{
protected static string GetIpv6(string address)
@ -239,4 +239,3 @@ namespace ServiceLib.Handler.Fmt
return $"{Global.ProtocolShares[eConfigType]}{url}{query}{remark}";
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class ClashFmt : BaseFmt
{
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
@ -20,4 +20,3 @@
return null;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class FmtHandler
{
private static readonly string _tag = "FmtHandler";
@ -89,4 +89,3 @@
}
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class Hysteria2Fmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -99,4 +99,3 @@ namespace ServiceLib.Handler.Fmt
return null;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class NaiveproxyFmt : BaseFmt
{
public static ProfileItem? ResolveFull(string strData, string? subRemarks)
@ -20,4 +20,3 @@
return null;
}
}
}

View file

@ -1,7 +1,7 @@
using System.Text.RegularExpressions;
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class ShadowsocksFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -177,4 +177,3 @@ namespace ServiceLib.Handler.Fmt
return null;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class SingboxFmt : BaseFmt
{
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
@ -45,4 +45,3 @@ namespace ServiceLib.Handler.Fmt
return profileItem;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class SocksFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -112,4 +112,3 @@ namespace ServiceLib.Handler.Fmt
return item;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class TrojanFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -45,4 +45,3 @@ namespace ServiceLib.Handler.Fmt
return ToUri(EConfigType.Trojan, item.Address, item.Port, item.Id, dicQuery, remark);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class TuicFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -61,4 +61,3 @@ namespace ServiceLib.Handler.Fmt
return ToUri(EConfigType.TUIC, item.Address, item.Port, $"{item.Id}:{item.Security}", dicQuery, remark);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class V2rayFmt : BaseFmt
{
public static List<ProfileItem>? ResolveFullArray(string strData, string? subRemarks)
@ -46,4 +46,3 @@ namespace ServiceLib.Handler.Fmt
return profileItem;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class VLESSFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -57,4 +57,3 @@ namespace ServiceLib.Handler.Fmt
return ToUri(EConfigType.VLESS, item.Address, item.Port, item.Id, dicQuery, remark);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class VmessFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -123,4 +123,3 @@ namespace ServiceLib.Handler.Fmt
return item;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.Fmt
{
namespace ServiceLib.Handler.Fmt;
public class WireguardFmt : BaseFmt
{
public static ProfileItem? Resolve(string str, out string msg)
@ -65,4 +65,3 @@ namespace ServiceLib.Handler.Fmt
return ToUri(EConfigType.WireGuard, item.Address, item.Port, item.Id, dicQuery, remark);
}
}
}

View file

@ -1,7 +1,7 @@
using ReactiveUI;
using ReactiveUI;
namespace ServiceLib.Handler;
namespace ServiceLib.Handler
{
public class NoticeHandler
{
private static readonly Lazy<NoticeHandler> _instance = new(() => new());
@ -41,4 +41,3 @@ namespace ServiceLib.Handler
SendMessage(msg);
}
}
}

View file

@ -1,8 +1,8 @@
using System.Net.Sockets;
using System.Text;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public class PacHandler
{
private static string _configPath;
@ -112,4 +112,3 @@ namespace ServiceLib.Handler
}
}
}
}

View file

@ -2,8 +2,8 @@ using System.Collections.Concurrent;
//using System.Reactive.Linq;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public class ProfileExHandler
{
private static readonly Lazy<ProfileExHandler> _instance = new(() => new());
@ -179,4 +179,3 @@ namespace ServiceLib.Handler
return _lstProfileEx.Max(t => t == null ? 0 : t.Sort);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public class StatisticsHandler
{
private static readonly Lazy<StatisticsHandler> instance = new(() => new());
@ -161,4 +161,3 @@
}
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.SysProxy
{
namespace ServiceLib.Handler.SysProxy;
public class ProxySettingLinux
{
private static readonly string _proxySetFileName = $"{Global.ProxySetLinuxShellFileName.Replace(Global.NamespaceSample, "")}.sh";
@ -30,4 +30,3 @@ namespace ServiceLib.Handler.SysProxy
await Utils.GetCliWrapOutput(fileName, args);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.SysProxy
{
namespace ServiceLib.Handler.SysProxy;
public class ProxySettingOSX
{
private static readonly string _proxySetFileName = $"{Global.ProxySetOSXShellFileName.Replace(Global.NamespaceSample, "")}.sh";
@ -35,4 +35,3 @@ namespace ServiceLib.Handler.SysProxy
await Utils.GetCliWrapOutput(fileName, args);
}
}
}

View file

@ -1,8 +1,8 @@
using System.Runtime.InteropServices;
using static ServiceLib.Handler.SysProxy.ProxySettingWindows.InternetConnectionOption;
namespace ServiceLib.Handler.SysProxy
{
namespace ServiceLib.Handler.SysProxy;
public class ProxySettingWindows
{
private const string _regPath = @"Software\Microsoft\Windows\CurrentVersion\Internet Settings";
@ -357,4 +357,3 @@ namespace ServiceLib.Handler.SysProxy
);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler.SysProxy
{
namespace ServiceLib.Handler.SysProxy;
public static class SysProxyHandler
{
private static readonly string _tag = "SysProxyHandler";
@ -96,4 +96,3 @@
ProxySettingWindows.SetProxy(strProxy, "", 4);
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public class TaskHandler
{
private static readonly Lazy<TaskHandler> _instance = new(() => new());
@ -95,4 +95,3 @@ namespace ServiceLib.Handler
}
}
}
}

View file

@ -1,8 +1,8 @@
using System.Net;
using WebDav;
namespace ServiceLib.Handler
{
namespace ServiceLib.Handler;
public sealed class WebDavHandler
{
private static readonly Lazy<WebDavHandler> _instance = new(() => new());
@ -179,4 +179,3 @@ namespace ServiceLib.Handler
public string GetLastError() => _lastDescription ?? string.Empty;
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class CheckUpdateModel
{
public bool? IsSelected { get; set; }
@ -8,4 +8,3 @@
public string? FileName { get; set; }
public bool? IsFinished { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class ClashConnectionModel
{
public string? Id { get; set; }
@ -14,4 +14,3 @@
public string? Elapsed { get; set; }
public string? Chain { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class ClashConnections
{
public ulong downloadTotal { get; set; }
@ -34,4 +34,3 @@
public string? processPath { get; set; }
public string? remoteDestination { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using static ServiceLib.Models.ClashProxies;
using static ServiceLib.Models.ClashProxies;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
public class ClashProviders
{
public Dictionary<string, ProvidersItem>? providers { get; set; }
@ -14,4 +14,3 @@ namespace ServiceLib.Models
public string? vehicleType { get; set; }
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class ClashProxies
{
public Dictionary<string, ProxiesItem>? proxies { get; set; }
@ -21,4 +21,3 @@
public int delay { get; set; }
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ClashProxyModel
{
@ -15,4 +15,3 @@
public bool IsActive { get; set; }
}
}

View file

@ -1,8 +1,7 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class CmdItem
{
public string? Cmd { get; set; }
public List<string>? Arguments { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class ComboItem
{
public string? ID
@ -12,4 +12,3 @@
get; set;
}
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
/// <summary>
/// 本软件配置文件实体类
/// </summary>
@ -54,4 +54,3 @@
#endregion other entities
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class CoreBasicItem
{
@ -245,4 +245,3 @@ namespace ServiceLib.Models
public string? Length { get; set; }
public string? Interval { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class CoreInfo
{
@ -18,4 +18,3 @@ namespace ServiceLib.Models
public string? VersionArg { get; set; }
public bool AbsolutePath { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable]
public class DNSItem
{
@ -17,4 +17,3 @@ namespace ServiceLib.Models
public string? DomainStrategy4Freedom { get; set; }
public string? DomainDNSAddress { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using System.Text.Json.Serialization;
using System.Text.Json.Serialization;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
public class GitHubReleaseAsset
{
[JsonPropertyName("url")] public string? Url { get; set; }
@ -65,4 +65,3 @@ namespace ServiceLib.Models
[JsonPropertyName("body")] public string? Body { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
internal class IPAPIInfo
{
public string? ip { get; set; }
@ -10,4 +10,3 @@
public string? country_name { get; set; }
public string? country_code { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ProfileExItem
{
@ -13,4 +13,3 @@ namespace ServiceLib.Models
public int Sort { get; set; }
public string? Message { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ProfileItem
{
@ -64,6 +64,7 @@ namespace ServiceLib.Models
[PrimaryKey]
public string IndexId { get; set; }
public EConfigType ConfigType { get; set; }
public int ConfigVersion { get; set; }
public string Address { get; set; }
@ -93,4 +94,3 @@ namespace ServiceLib.Models
public string SpiderX { get; set; }
public string Extra { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ProfileItemModel : ProfileItem
{
@ -15,4 +15,3 @@
public string TotalUp { get; set; }
public string TotalDown { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class RetResult
{
public bool Success { get; set; }
@ -24,4 +24,3 @@
Data = data;
}
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable]
public class RoutingItem
{
@ -20,4 +20,3 @@ namespace ServiceLib.Models
public string DomainStrategy4Singbox { get; set; }
public int Sort { get; set; }
}
}

View file

@ -1,8 +1,7 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class RoutingItemModel : RoutingItem
{
public bool IsActive { get; set; }
}
}

View file

@ -1,9 +1,8 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class RoutingTemplate
{
public string Version { get; set; }
public RoutingItem[] RoutingItems { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class RulesItem
{
@ -16,4 +16,3 @@
public bool Enabled { get; set; } = true;
public string? Remarks { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class RulesItemModel : RulesItem
{
@ -8,4 +8,3 @@
public string Domains { get; set; }
public string Protocols { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ServerSpeedItem : ServerStatItem
{
@ -19,4 +19,3 @@
public ulong Down { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable]
public class ServerStatItem
{
@ -18,4 +18,3 @@ namespace ServiceLib.Models
public long DateNow { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class ServerTestItem
{
@ -10,4 +10,3 @@ namespace ServiceLib.Models
public bool AllowTest { get; set; }
public int QueueNum { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class SingboxConfig
{
public Log4Sbox log { get; set; }
@ -254,4 +254,3 @@ namespace ServiceLib.Models
public string? download_detour { get; set; }
public string? update_interval { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
[Serializable]
public class SpeedTestResult
{
@ -9,4 +9,3 @@
public string? Speed { get; set; }
}
}

View file

@ -1,5 +1,5 @@
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class SsSIP008
{
public List<SsServer>? servers { get; set; }
@ -15,4 +15,3 @@
public string? password { get; set; }
public string? plugin { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using SQLite;
using SQLite;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
[Serializable]
public class SubItem
{
@ -36,4 +36,3 @@ namespace ServiceLib.Models
public string? Memo { get; set; }
}
}

View file

@ -1,7 +1,7 @@
using System.Text.Json.Serialization;
namespace ServiceLib.Models
{
namespace ServiceLib.Models;
public class V2rayConfig
{
public Log4Ray log { get; set; }
@ -434,4 +434,3 @@ namespace ServiceLib.Models
public string? length { get; set; }
public string? interval { get; set; }
}
}

View file

@ -1,12 +1,11 @@
using System.Collections;
using System.Collections;
namespace ServiceLib.Models;
namespace ServiceLib.Models
{
internal class V2rayMetricsVars
{
public V2rayMetricsVarsStats? stats { get; set; }
}
}
public class V2rayMetricsVarsStats
{

Some files were not shown because too many files have changed in this diff Show more