Skip to content

Commit 8090799

Browse files
committed
Refactor models into sub-namespaces
Move many model classes into new sub-namespaces (ServiceLib.Models.CoreConfigs, ServiceLib.Models.Configs, ServiceLib.Models.Dto, ServiceLib.Models.Entities). Update GlobalUsings in ServiceLib, v2rayN.Desktop, v2rayN and add a tests GlobalUsings file to reference the new namespaces. Adjust static using directives in ClashApiManager and ClashProxiesViewModel to use ServiceLib.Models.Dto. This is a reorganization/rename of files and namespaces with no functional changes.
1 parent 700f981 commit 8090799

47 files changed

Lines changed: 97 additions & 48 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
global using System.Collections.Concurrent;
2+
global using System.Diagnostics;
3+
global using System.Net;
4+
global using System.Net.NetworkInformation;
5+
global using System.Net.Sockets;
6+
global using System.Reactive;
7+
global using System.Reactive.Disposables;
8+
global using System.Reactive.Linq;
9+
global using System.Reflection;
10+
global using System.Runtime.InteropServices;
11+
global using System.Security.Cryptography;
12+
global using System.Text;
13+
global using System.Text.Encodings.Web;
14+
global using System.Text.Json;
15+
global using System.Text.Json.Nodes;
16+
global using System.Text.Json.Serialization;
17+
global using System.Text.RegularExpressions;
18+
global using DynamicData;
19+
global using DynamicData.Binding;
20+
global using ReactiveUI;
21+
global using ReactiveUI.Fody.Helpers;
22+
global using ServiceLib.Base;
23+
global using ServiceLib.Common;
24+
global using ServiceLib.Enums;
25+
global using ServiceLib.Events;
26+
global using ServiceLib.Handler;
27+
global using ServiceLib.Handler.Builder;
28+
global using ServiceLib.Handler.Fmt;
29+
global using ServiceLib.Handler.SysProxy;
30+
global using ServiceLib.Helper;
31+
global using ServiceLib.Manager;
32+
global using ServiceLib.Models.CoreConfigs;
33+
global using ServiceLib.Models.Configs;
34+
global using ServiceLib.Models.Dto;
35+
global using ServiceLib.Models.Entities;
36+
global using ServiceLib.Resx;
37+
global using ServiceLib.Services;
38+
global using ServiceLib.Services.CoreConfig;
39+
global using ServiceLib.Services.Statistics;
40+
global using SQLite;

v2rayN/ServiceLib/GlobalUsings.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
global using ServiceLib.Handler.SysProxy;
3030
global using ServiceLib.Helper;
3131
global using ServiceLib.Manager;
32-
global using ServiceLib.Models;
32+
global using ServiceLib.Models.CoreConfigs;
33+
global using ServiceLib.Models.Configs;
34+
global using ServiceLib.Models.Dto;
35+
global using ServiceLib.Models.Entities;
3336
global using ServiceLib.Resx;
3437
global using ServiceLib.Services;
3538
global using ServiceLib.Services.CoreConfig;

v2rayN/ServiceLib/Manager/ClashApiManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using static ServiceLib.Models.ClashProxies;
1+
using static ServiceLib.Models.Dto.ClashProxies;
22

33
namespace ServiceLib.Manager;
44

v2rayN/ServiceLib/Models/Config.cs renamed to v2rayN/ServiceLib/Models/Configs/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.Configs;
22

33
[Serializable]
44
public class Config

v2rayN/ServiceLib/Models/ConfigItems.cs renamed to v2rayN/ServiceLib/Models/Configs/ConfigItems.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.Configs;
22

33
[Serializable]
44
public class CoreBasicItem

v2rayN/ServiceLib/Models/CoreConfigContext.cs renamed to v2rayN/ServiceLib/Models/CoreConfigs/CoreConfigContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.CoreConfigs;
22

33
public record CoreConfigContext
44
{

v2rayN/ServiceLib/Models/CoreInfo.cs renamed to v2rayN/ServiceLib/Models/CoreConfigs/CoreInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.CoreConfigs;
22

33
[Serializable]
44
public class CoreInfo

v2rayN/ServiceLib/Models/SingboxConfig.cs renamed to v2rayN/ServiceLib/Models/CoreConfigs/SingboxConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.CoreConfigs;
22

33
public class SingboxConfig
44
{

v2rayN/ServiceLib/Models/V2rayConfig.cs renamed to v2rayN/ServiceLib/Models/CoreConfigs/V2rayConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace ServiceLib.Models;
1+
namespace ServiceLib.Models.CoreConfigs;
22

33
public class V2rayConfig
44
{

v2rayN/ServiceLib/Models/V2rayMetricsVars.cs renamed to v2rayN/ServiceLib/Models/CoreConfigs/V2rayMetricsVars.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Collections;
22

3-
namespace ServiceLib.Models;
3+
namespace ServiceLib.Models.CoreConfigs;
44

55
internal class V2rayMetricsVars
66
{

0 commit comments

Comments
 (0)