diff --git a/package-rhel-riscv.sh b/package-rhel-riscv.sh
index 9136238f..fc8ed6a7 100644
--- a/package-rhel-riscv.sh
+++ b/package-rhel-riscv.sh
@@ -38,7 +38,7 @@ DOTNET_RISCV_BASE="https://github.com/filipnavara/dotnet-riscv/releases/download
DOTNET_RISCV_FILE="dotnet-sdk-${DOTNET_RISCV_VERSION}-linux-riscv64.tar.gz"
DOTNET_SDK_URL="${DOTNET_RISCV_BASE}/${DOTNET_RISCV_VERSION}/${DOTNET_RISCV_FILE}"
SKIA_VER="${SKIA_VER:-3.119.2}"
-HARFBUZZ_VER="${HARFBUZZ_VER:-8.3.1.1}"
+HARFBUZZ_VER="${HARFBUZZ_VER:-8.3.1.3}"
# If the first argument starts with --, do not treat it as a version number
if [[ "${VERSION_ARG:-}" == --* ]]; then
@@ -111,9 +111,9 @@ build_sqlite_native_riscv64() {
mkdir -p "$outdir"
workdir="$(mktemp -d)"
- # SQLite 3.51.3 amalgamation
+ # SQLite 3.53.0 amalgamation
sqlite_year="2026"
- sqlite_ver="3510300"
+ sqlite_ver="3530000"
sqlite_zip="sqlite-amalgamation-${sqlite_ver}.zip"
echo "[+] Download SQLite amalgamation: ${sqlite_zip}"
diff --git a/v2rayN/Directory.Packages.props b/v2rayN/Directory.Packages.props
index 54cb829c..4c36dde8 100644
--- a/v2rayN/Directory.Packages.props
+++ b/v2rayN/Directory.Packages.props
@@ -7,32 +7,33 @@
-
-
+
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
+
+
-
+
-
+
-
-
+
+
diff --git a/v2rayN/ServiceLib.Tests/ServiceLib.Tests.csproj b/v2rayN/ServiceLib.Tests/ServiceLib.Tests.csproj
index f86ca573..f4bbbca1 100644
--- a/v2rayN/ServiceLib.Tests/ServiceLib.Tests.csproj
+++ b/v2rayN/ServiceLib.Tests/ServiceLib.Tests.csproj
@@ -20,4 +20,8 @@
+
+
+
+
diff --git a/v2rayN/ServiceLib.Tests/xunit.runner.json b/v2rayN/ServiceLib.Tests/xunit.runner.json
new file mode 100644
index 00000000..0a7dfd97
--- /dev/null
+++ b/v2rayN/ServiceLib.Tests/xunit.runner.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
+ "culture": "invariant"
+}
diff --git a/v2rayN/ServiceLib/FodyWeavers.xml b/v2rayN/ServiceLib/FodyWeavers.xml
deleted file mode 100644
index 63fc1484..00000000
--- a/v2rayN/ServiceLib/FodyWeavers.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/GlobalUsings.cs b/v2rayN/ServiceLib/GlobalUsings.cs
index 4ec719c2..69eef476 100644
--- a/v2rayN/ServiceLib/GlobalUsings.cs
+++ b/v2rayN/ServiceLib/GlobalUsings.cs
@@ -19,7 +19,7 @@ global using System.Text.RegularExpressions;
global using DynamicData;
global using DynamicData.Binding;
global using ReactiveUI;
-global using ReactiveUI.Fody.Helpers;
+global using ReactiveUI.SourceGenerators;
global using ServiceLib.Base;
global using ServiceLib.Common;
global using ServiceLib.Enums;
diff --git a/v2rayN/ServiceLib/Helper/SqliteHelper.cs b/v2rayN/ServiceLib/Helper/SqliteHelper.cs
index 83c9bf90..1e6ef745 100644
--- a/v2rayN/ServiceLib/Helper/SqliteHelper.cs
+++ b/v2rayN/ServiceLib/Helper/SqliteHelper.cs
@@ -11,6 +11,11 @@ public sealed class SQLiteHelper
private SQLiteAsyncConnection _dbAsync;
private readonly string _configDB = "guiNDB.db";
+ static SQLiteHelper()
+ {
+ SQLitePCL.Batteries_V2.Init();
+ }
+
public SQLiteHelper()
{
_connstr = Utils.GetConfigPath(_configDB);
diff --git a/v2rayN/ServiceLib/Models/CheckUpdateModel.cs b/v2rayN/ServiceLib/Models/CheckUpdateModel.cs
index 2707cc6e..ba025ba9 100644
--- a/v2rayN/ServiceLib/Models/CheckUpdateModel.cs
+++ b/v2rayN/ServiceLib/Models/CheckUpdateModel.cs
@@ -1,10 +1,10 @@
namespace ServiceLib.Models;
-public class CheckUpdateModel : ReactiveObject
+public partial class CheckUpdateModel : ReactiveObject
{
public bool? IsSelected { get; set; }
public string? CoreType { get; set; }
- [Reactive] public string? Remarks { get; set; }
+ [Reactive] public partial string? Remarks { get; set; }
public string? FileName { get; set; }
public bool? IsFinished { get; set; }
}
diff --git a/v2rayN/ServiceLib/Models/ClashProxyModel.cs b/v2rayN/ServiceLib/Models/ClashProxyModel.cs
index 10d68e14..c8324735 100644
--- a/v2rayN/ServiceLib/Models/ClashProxyModel.cs
+++ b/v2rayN/ServiceLib/Models/ClashProxyModel.cs
@@ -1,7 +1,7 @@
namespace ServiceLib.Models;
[Serializable]
-public class ClashProxyModel : ReactiveObject
+public partial class ClashProxyModel : ReactiveObject
{
public string? Name { get; set; }
@@ -9,9 +9,9 @@ public class ClashProxyModel : ReactiveObject
public string? Now { get; set; }
- [Reactive] public int Delay { get; set; }
+ [Reactive] public partial int Delay { get; set; }
- [Reactive] public string? DelayName { get; set; }
+ [Reactive] public partial string? DelayName { get; set; }
public bool IsActive { get; set; }
}
diff --git a/v2rayN/ServiceLib/Models/ProfileItemModel.cs b/v2rayN/ServiceLib/Models/ProfileItemModel.cs
index 53170f17..a2a523c3 100644
--- a/v2rayN/ServiceLib/Models/ProfileItemModel.cs
+++ b/v2rayN/ServiceLib/Models/ProfileItemModel.cs
@@ -1,7 +1,7 @@
namespace ServiceLib.Models;
[Serializable]
-public class ProfileItemModel : ReactiveObject
+public partial class ProfileItemModel : ReactiveObject
{
public bool IsActive { get; set; }
public string IndexId { get; set; }
@@ -16,27 +16,27 @@ public class ProfileItemModel : ReactiveObject
public int Sort { get; set; }
[Reactive]
- public int Delay { get; set; }
+ public partial int Delay { get; set; }
public decimal Speed { get; set; }
[Reactive]
- public string DelayVal { get; set; }
+ public partial string DelayVal { get; set; }
[Reactive]
- public string SpeedVal { get; set; }
+ public partial string SpeedVal { get; set; }
[Reactive]
- public string TodayUp { get; set; }
+ public partial string TodayUp { get; set; }
[Reactive]
- public string TodayDown { get; set; }
+ public partial string TodayDown { get; set; }
[Reactive]
- public string TotalUp { get; set; }
+ public partial string TotalUp { get; set; }
[Reactive]
- public string TotalDown { get; set; }
+ public partial string TotalDown { get; set; }
public string GetSummary()
{
diff --git a/v2rayN/ServiceLib/ServiceLib.csproj b/v2rayN/ServiceLib/ServiceLib.csproj
index 60d9c622..2e5efa21 100644
--- a/v2rayN/ServiceLib/ServiceLib.csproj
+++ b/v2rayN/ServiceLib/ServiceLib.csproj
@@ -9,8 +9,10 @@
true
-
-
+
+
+
+
diff --git a/v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs
index 7d4d0948..d8128890 100644
--- a/v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/AddGroupServerViewModel.cs
@@ -1,27 +1,27 @@
namespace ServiceLib.ViewModels;
-public class AddGroupServerViewModel : MyReactiveObject
+public partial class AddGroupServerViewModel : MyReactiveObject
{
[Reactive]
- public ProfileItem SelectedSource { get; set; }
+ public partial ProfileItem SelectedSource { get; set; }
[Reactive]
- public ProfileItem SelectedChild { get; set; }
+ public partial ProfileItem SelectedChild { get; set; }
[Reactive]
- public IList SelectedChildren { get; set; }
+ public partial IList SelectedChildren { get; set; }
[Reactive]
- public string? CoreType { get; set; }
+ public partial string? CoreType { get; set; }
[Reactive]
- public string? PolicyGroupType { get; set; }
+ public partial string? PolicyGroupType { get; set; }
[Reactive]
- public SubItem? SelectedSubItem { get; set; }
+ public partial SubItem? SelectedSubItem { get; set; }
[Reactive]
- public string? Filter { get; set; }
+ public partial string? Filter { get; set; }
public IObservableCollection SubItems { get; } = new ObservableCollectionExtended();
diff --git a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs
index cbc97642..3b28de48 100644
--- a/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/AddServer2ViewModel.cs
@@ -1,12 +1,12 @@
namespace ServiceLib.ViewModels;
-public class AddServer2ViewModel : MyReactiveObject
+public partial class AddServer2ViewModel : MyReactiveObject
{
[Reactive]
- public ProfileItem SelectedSource { get; set; }
+ public partial ProfileItem SelectedSource { get; set; }
[Reactive]
- public string? CoreType { get; set; }
+ public partial string? CoreType { get; set; }
public ReactiveCommand BrowseServerCmd { get; }
public ReactiveCommand EditServerCmd { get; }
diff --git a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs
index 20439a03..37dd8cb5 100644
--- a/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/AddServerViewModel.cs
@@ -1,113 +1,113 @@
namespace ServiceLib.ViewModels;
-public class AddServerViewModel : MyReactiveObject
+public partial class AddServerViewModel : MyReactiveObject
{
[Reactive]
- public ProfileItem SelectedSource { get; set; }
+ public partial ProfileItem SelectedSource { get; set; }
[Reactive]
- public string? CoreType { get; set; }
+ public partial string? CoreType { get; set; }
[Reactive]
- public string Cert { get; set; }
+ public partial string Cert { get; set; }
[Reactive]
- public string CertTip { get; set; }
+ public partial string CertTip { get; set; }
[Reactive]
- public string CertSha { get; set; }
+ public partial string CertSha { get; set; }
[Reactive]
- public bool AllowInsecureCertFetch { get; set; }
+ public partial bool AllowInsecureCertFetch { get; set; }
[Reactive]
- public string SalamanderPass { get; set; }
+ public partial string SalamanderPass { get; set; }
[Reactive]
- public int AlterId { get; set; }
+ public partial int AlterId { get; set; }
[Reactive]
- public string Ports { get; set; }
+ public partial string Ports { get; set; }
[Reactive]
- public int? UpMbps { get; set; }
+ public partial int? UpMbps { get; set; }
[Reactive]
- public int? DownMbps { get; set; }
+ public partial int? DownMbps { get; set; }
[Reactive]
- public string HopInterval { get; set; }
+ public partial string HopInterval { get; set; }
[Reactive]
- public string Flow { get; set; }
+ public partial string Flow { get; set; }
[Reactive]
- public string VmessSecurity { get; set; }
+ public partial string VmessSecurity { get; set; }
[Reactive]
- public string VlessEncryption { get; set; }
+ public partial string VlessEncryption { get; set; }
[Reactive]
- public string SsMethod { get; set; }
+ public partial string SsMethod { get; set; }
[Reactive]
- public string WgPublicKey { get; set; }
+ public partial string WgPublicKey { get; set; }
//[Reactive]
//public string WgPresharedKey { get; set; }
[Reactive]
- public string WgInterfaceAddress { get; set; }
+ public partial string WgInterfaceAddress { get; set; }
[Reactive]
- public string WgReserved { get; set; }
+ public partial string WgReserved { get; set; }
[Reactive]
- public int WgMtu { get; set; }
+ public partial int WgMtu { get; set; }
[Reactive]
- public bool Uot { get; set; }
+ public partial bool Uot { get; set; }
[Reactive]
- public string CongestionControl { get; set; }
+ public partial string CongestionControl { get; set; }
[Reactive]
- public int? InsecureConcurrency { get; set; }
+ public partial int? InsecureConcurrency { get; set; }
[Reactive]
- public bool NaiveQuic { get; set; }
+ public partial bool NaiveQuic { get; set; }
[Reactive]
- public string RawHeaderType { get; set; }
+ public partial string RawHeaderType { get; set; }
[Reactive]
- public string Host { get; set; }
+ public partial string Host { get; set; }
[Reactive]
- public string Path { get; set; }
+ public partial string Path { get; set; }
[Reactive]
- public string XhttpMode { get; set; }
+ public partial string XhttpMode { get; set; }
[Reactive]
- public string XhttpExtra { get; set; }
+ public partial string XhttpExtra { get; set; }
[Reactive]
- public string GrpcAuthority { get; set; }
+ public partial string GrpcAuthority { get; set; }
[Reactive]
- public string GrpcServiceName { get; set; }
+ public partial string GrpcServiceName { get; set; }
[Reactive]
- public string GrpcMode { get; set; }
+ public partial string GrpcMode { get; set; }
[Reactive]
- public string KcpHeaderType { get; set; }
+ public partial string KcpHeaderType { get; set; }
[Reactive]
- public string KcpSeed { get; set; }
+ public partial string KcpSeed { get; set; }
[Reactive]
- public int? KcpMtu { get; set; }
+ public partial int? KcpMtu { get; set; }
public string TransportHeaderType
{
diff --git a/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs b/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs
index dbe3b24d..0ff35e12 100644
--- a/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/BackupAndRestoreViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class BackupAndRestoreViewModel : MyReactiveObject
+public partial class BackupAndRestoreViewModel : MyReactiveObject
{
private readonly string _guiConfigs = "guiConfigs";
private static string BackupFileName => $"backup_{DateTime.Now:yyyyMMddHHmmss}.zip";
@@ -10,10 +10,10 @@ public class BackupAndRestoreViewModel : MyReactiveObject
public ReactiveCommand WebDavCheckCmd { get; }
[Reactive]
- public WebDavItem SelectedSource { get; set; }
+ public partial WebDavItem SelectedSource { get; set; }
[Reactive]
- public string OperationMsg { get; set; }
+ public partial string OperationMsg { get; set; }
public BackupAndRestoreViewModel(Func>? updateView)
{
diff --git a/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs b/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs
index dc31b41b..7a549c9b 100644
--- a/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/CheckUpdateViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class CheckUpdateViewModel : MyReactiveObject
+public partial class CheckUpdateViewModel : MyReactiveObject
{
private const string _geo = "GeoFiles";
private readonly string _v2rayN = ECoreType.v2rayN.ToString();
@@ -9,7 +9,7 @@ public class CheckUpdateViewModel : MyReactiveObject
public IObservableCollection CheckUpdateModels { get; } = new ObservableCollectionExtended();
public ReactiveCommand CheckUpdateCmd { get; }
- [Reactive] public bool EnableCheckPreReleaseUpdate { get; set; }
+ [Reactive] public partial bool EnableCheckPreReleaseUpdate { get; set; }
public CheckUpdateViewModel(Func>? updateView)
{
diff --git a/v2rayN/ServiceLib/ViewModels/ClashConnectionsViewModel.cs b/v2rayN/ServiceLib/ViewModels/ClashConnectionsViewModel.cs
index 07de23f2..132ef370 100644
--- a/v2rayN/ServiceLib/ViewModels/ClashConnectionsViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/ClashConnectionsViewModel.cs
@@ -1,20 +1,20 @@
namespace ServiceLib.ViewModels;
-public class ClashConnectionsViewModel : MyReactiveObject
+public partial class ClashConnectionsViewModel : MyReactiveObject
{
public IObservableCollection ConnectionItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public ClashConnectionModel SelectedSource { get; set; }
+ public partial ClashConnectionModel SelectedSource { get; set; }
public ReactiveCommand ConnectionCloseCmd { get; }
public ReactiveCommand ConnectionCloseAllCmd { get; }
[Reactive]
- public string HostFilter { get; set; }
+ public partial string HostFilter { get; set; }
[Reactive]
- public bool AutoRefresh { get; set; }
+ public partial bool AutoRefresh { get; set; }
public ClashConnectionsViewModel(Func>? updateView)
{
diff --git a/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs
index 6220719b..8bb8e741 100644
--- a/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/ClashProxiesViewModel.cs
@@ -4,7 +4,7 @@ using static ServiceLib.Models.ClashProxies;
namespace ServiceLib.ViewModels;
-public class ClashProxiesViewModel : MyReactiveObject
+public partial class ClashProxiesViewModel : MyReactiveObject
{
private Dictionary? _proxies;
private Dictionary? _providers;
@@ -14,10 +14,10 @@ public class ClashProxiesViewModel : MyReactiveObject
public IObservableCollection ProxyDetails { get; } = new ObservableCollectionExtended();
[Reactive]
- public ClashProxyModel SelectedGroup { get; set; }
+ public partial ClashProxyModel SelectedGroup { get; set; }
[Reactive]
- public ClashProxyModel SelectedDetail { get; set; }
+ public partial ClashProxyModel SelectedDetail { get; set; }
public ReactiveCommand ProxiesReloadCmd { get; }
public ReactiveCommand ProxiesDelayTestCmd { get; }
@@ -25,13 +25,13 @@ public class ClashProxiesViewModel : MyReactiveObject
public ReactiveCommand ProxiesSelectActivityCmd { get; }
[Reactive]
- public int RuleModeSelected { get; set; }
+ public partial int RuleModeSelected { get; set; }
[Reactive]
- public int SortingSelected { get; set; }
+ public partial int SortingSelected { get; set; }
[Reactive]
- public bool AutoRefresh { get; set; }
+ public partial bool AutoRefresh { get; set; }
public ClashProxiesViewModel(Func>? updateView)
{
diff --git a/v2rayN/ServiceLib/ViewModels/DNSSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/DNSSettingViewModel.cs
index 13571616..b80c7129 100644
--- a/v2rayN/ServiceLib/ViewModels/DNSSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/DNSSettingViewModel.cs
@@ -1,35 +1,35 @@
namespace ServiceLib.ViewModels;
-public class DNSSettingViewModel : MyReactiveObject
+public partial class DNSSettingViewModel : MyReactiveObject
{
- [Reactive] public bool? UseSystemHosts { get; set; }
- [Reactive] public bool? AddCommonHosts { get; set; }
- [Reactive] public bool? FakeIP { get; set; }
- [Reactive] public bool? BlockBindingQuery { get; set; }
- [Reactive] public string? DirectDNS { get; set; }
- [Reactive] public string? RemoteDNS { get; set; }
- [Reactive] public string? BootstrapDNS { get; set; }
- [Reactive] public string? Strategy4Freedom { get; set; }
- [Reactive] public string? Strategy4Proxy { get; set; }
- [Reactive] public string? Hosts { get; set; }
- [Reactive] public string? DirectExpectedIPs { get; set; }
- [Reactive] public bool? ParallelQuery { get; set; }
- [Reactive] public bool? ServeStale { get; set; }
+ [Reactive] public partial bool? UseSystemHosts { get; set; }
+ [Reactive] public partial bool? AddCommonHosts { get; set; }
+ [Reactive] public partial bool? FakeIP { get; set; }
+ [Reactive] public partial bool? BlockBindingQuery { get; set; }
+ [Reactive] public partial string? DirectDNS { get; set; }
+ [Reactive] public partial string? RemoteDNS { get; set; }
+ [Reactive] public partial string? BootstrapDNS { get; set; }
+ [Reactive] public partial string? Strategy4Freedom { get; set; }
+ [Reactive] public partial string? Strategy4Proxy { get; set; }
+ [Reactive] public partial string? Hosts { get; set; }
+ [Reactive] public partial string? DirectExpectedIPs { get; set; }
+ [Reactive] public partial bool? ParallelQuery { get; set; }
+ [Reactive] public partial bool? ServeStale { get; set; }
- [Reactive] public bool UseSystemHostsCompatible { get; set; }
- [Reactive] public string DomainStrategy4FreedomCompatible { get; set; }
- [Reactive] public string DomainDNSAddressCompatible { get; set; }
- [Reactive] public string NormalDNSCompatible { get; set; }
- [Reactive] public string TunDNSCompatible { get; set; }
+ [Reactive] public partial bool UseSystemHostsCompatible { get; set; }
+ [Reactive] public partial string DomainStrategy4FreedomCompatible { get; set; }
+ [Reactive] public partial string DomainDNSAddressCompatible { get; set; }
+ [Reactive] public partial string NormalDNSCompatible { get; set; }
+ [Reactive] public partial string TunDNSCompatible { get; set; }
- [Reactive] public string DomainStrategy4Freedom2Compatible { get; set; }
- [Reactive] public string DomainDNSAddress2Compatible { get; set; }
- [Reactive] public string NormalDNS2Compatible { get; set; }
- [Reactive] public string TunDNS2Compatible { get; set; }
- [Reactive] public bool RayCustomDNSEnableCompatible { get; set; }
- [Reactive] public bool SBCustomDNSEnableCompatible { get; set; }
+ [Reactive] public partial string DomainStrategy4Freedom2Compatible { get; set; }
+ [Reactive] public partial string DomainDNSAddress2Compatible { get; set; }
+ [Reactive] public partial string NormalDNS2Compatible { get; set; }
+ [Reactive] public partial string TunDNS2Compatible { get; set; }
+ [Reactive] public partial bool RayCustomDNSEnableCompatible { get; set; }
+ [Reactive] public partial bool SBCustomDNSEnableCompatible { get; set; }
- [ObservableAsProperty] public bool IsSimpleDNSEnabled { get; }
+ [ObservableAsProperty] private bool _isSimpleDNSEnabled;
public ReactiveCommand SaveCmd { get; }
public ReactiveCommand ImportDefConfig4V2rayCompatibleCmd { get; }
@@ -55,9 +55,9 @@ public class DNSSettingViewModel : MyReactiveObject
await Task.CompletedTask;
});
- this.WhenAnyValue(x => x.RayCustomDNSEnableCompatible, x => x.SBCustomDNSEnableCompatible)
+ _isSimpleDNSEnabledHelper = this.WhenAnyValue(x => x.RayCustomDNSEnableCompatible, x => x.SBCustomDNSEnableCompatible)
.Select(x => !(x.Item1 && x.Item2))
- .ToPropertyEx(this, x => x.IsSimpleDNSEnabled);
+ .ToProperty(this, nameof(IsSimpleDNSEnabled));
_ = Init();
}
diff --git a/v2rayN/ServiceLib/ViewModels/FullConfigTemplateViewModel.cs b/v2rayN/ServiceLib/ViewModels/FullConfigTemplateViewModel.cs
index 78cd10a2..276a2aec 100644
--- a/v2rayN/ServiceLib/ViewModels/FullConfigTemplateViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/FullConfigTemplateViewModel.cs
@@ -1,38 +1,38 @@
namespace ServiceLib.ViewModels;
-public class FullConfigTemplateViewModel : MyReactiveObject
+public partial class FullConfigTemplateViewModel : MyReactiveObject
{
#region Reactive
[Reactive]
- public bool EnableFullConfigTemplate4Ray { get; set; }
+ public partial bool EnableFullConfigTemplate4Ray { get; set; }
[Reactive]
- public bool EnableFullConfigTemplate4Singbox { get; set; }
+ public partial bool EnableFullConfigTemplate4Singbox { get; set; }
[Reactive]
- public string FullConfigTemplate4Ray { get; set; }
+ public partial string FullConfigTemplate4Ray { get; set; }
[Reactive]
- public string FullTunConfigTemplate4Ray { get; set; }
+ public partial string FullTunConfigTemplate4Ray { get; set; }
[Reactive]
- public string FullConfigTemplate4Singbox { get; set; }
+ public partial string FullConfigTemplate4Singbox { get; set; }
[Reactive]
- public string FullTunConfigTemplate4Singbox { get; set; }
+ public partial string FullTunConfigTemplate4Singbox { get; set; }
[Reactive]
- public bool AddProxyOnly4Ray { get; set; }
+ public partial bool AddProxyOnly4Ray { get; set; }
[Reactive]
- public bool AddProxyOnly4Singbox { get; set; }
+ public partial bool AddProxyOnly4Singbox { get; set; }
[Reactive]
- public string ProxyDetour4Ray { get; set; }
+ public partial string ProxyDetour4Ray { get; set; }
[Reactive]
- public string ProxyDetour4Singbox { get; set; }
+ public partial string ProxyDetour4Singbox { get; set; }
public ReactiveCommand SaveCmd { get; }
diff --git a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
index 53ad06c8..c036025d 100644
--- a/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
@@ -2,7 +2,7 @@ using System.Reactive.Concurrency;
namespace ServiceLib.ViewModels;
-public class MainWindowViewModel : MyReactiveObject
+public partial class MainWindowViewModel : MyReactiveObject
{
#region Menu
@@ -55,15 +55,15 @@ public class MainWindowViewModel : MyReactiveObject
public ReactiveCommand ReloadCmd { get; }
[Reactive]
- public bool BlReloadEnabled { get; set; }
+ public partial bool BlReloadEnabled { get; set; }
[Reactive]
- public bool ShowClashUI { get; set; }
+ public partial bool ShowClashUI { get; set; }
[Reactive]
- public int TabMainSelectedIndex { get; set; }
+ public partial int TabMainSelectedIndex { get; set; }
- [Reactive] public bool BlIsWindows { get; set; }
+ [Reactive] public partial bool BlIsWindows { get; set; }
#endregion Menu
diff --git a/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs b/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs
index fbe06cb0..38fb173a 100644
--- a/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/MsgViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class MsgViewModel : MyReactiveObject
+public partial class MsgViewModel : MyReactiveObject
{
private readonly ConcurrentQueue _queueMsg = new();
private volatile bool _lastMsgFilterNotAvailable;
@@ -8,10 +8,10 @@ public class MsgViewModel : MyReactiveObject
public int NumMaxMsg { get; } = 500;
[Reactive]
- public string MsgFilter { get; set; }
+ public partial string MsgFilter { get; set; }
[Reactive]
- public bool AutoRefresh { get; set; }
+ public partial bool AutoRefresh { get; set; }
public MsgViewModel(Func>? updateView)
{
diff --git a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
index 51db6809..b1e128a8 100644
--- a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
@@ -1,31 +1,31 @@
namespace ServiceLib.ViewModels;
-public class OptionSettingViewModel : MyReactiveObject
+public partial class OptionSettingViewModel : MyReactiveObject
{
#region Core
- [Reactive] public int localPort { get; set; }
- [Reactive] public bool SecondLocalPortEnabled { get; set; }
- [Reactive] public bool udpEnabled { get; set; }
- [Reactive] public bool sniffingEnabled { get; set; }
+ [Reactive] public partial int localPort { get; set; }
+ [Reactive] public partial bool SecondLocalPortEnabled { get; set; }
+ [Reactive] public partial bool udpEnabled { get; set; }
+ [Reactive] public partial bool sniffingEnabled { get; set; }
public IList destOverride { get; set; }
- [Reactive] public bool routeOnly { get; set; }
- [Reactive] public bool allowLANConn { get; set; }
- [Reactive] public bool newPort4LAN { get; set; }
- [Reactive] public string user { get; set; }
- [Reactive] public string pass { get; set; }
- [Reactive] public bool muxEnabled { get; set; }
- [Reactive] public bool logEnabled { get; set; }
- [Reactive] public string loglevel { get; set; }
- [Reactive] public bool defAllowInsecure { get; set; }
- [Reactive] public string defFingerprint { get; set; }
- [Reactive] public string defUserAgent { get; set; }
- [Reactive] public string sendThrough { get; set; }
- [Reactive] public string mux4SboxProtocol { get; set; }
- [Reactive] public bool enableCacheFile4Sbox { get; set; }
- [Reactive] public int? hyUpMbps { get; set; }
- [Reactive] public int? hyDownMbps { get; set; }
- [Reactive] public bool enableFragment { get; set; }
+ [Reactive] public partial bool routeOnly { get; set; }
+ [Reactive] public partial bool allowLANConn { get; set; }
+ [Reactive] public partial bool newPort4LAN { get; set; }
+ [Reactive] public partial string user { get; set; }
+ [Reactive] public partial string pass { get; set; }
+ [Reactive] public partial bool muxEnabled { get; set; }
+ [Reactive] public partial bool logEnabled { get; set; }
+ [Reactive] public partial string loglevel { get; set; }
+ [Reactive] public partial bool defAllowInsecure { get; set; }
+ [Reactive] public partial string defFingerprint { get; set; }
+ [Reactive] public partial string defUserAgent { get; set; }
+ [Reactive] public partial string sendThrough { get; set; }
+ [Reactive] public partial string mux4SboxProtocol { get; set; }
+ [Reactive] public partial bool enableCacheFile4Sbox { get; set; }
+ [Reactive] public partial int? hyUpMbps { get; set; }
+ [Reactive] public partial int? hyDownMbps { get; set; }
+ [Reactive] public partial bool enableFragment { get; set; }
#endregion Core
@@ -43,75 +43,75 @@ public class OptionSettingViewModel : MyReactiveObject
#region UI
- [Reactive] public bool AutoRun { get; set; }
- [Reactive] public bool EnableStatistics { get; set; }
- [Reactive] public bool KeepOlderDedupl { get; set; }
- [Reactive] public bool DisplayRealTimeSpeed { get; set; }
- [Reactive] public bool EnableAutoAdjustMainLvColWidth { get; set; }
- [Reactive] public bool AutoHideStartup { get; set; }
- [Reactive] public bool Hide2TrayWhenClose { get; set; }
- [Reactive] public bool MacOSShowInDock { get; set; }
- [Reactive] public bool EnableDragDropSort { get; set; }
- [Reactive] public bool DoubleClick2Activate { get; set; }
- [Reactive] public int AutoUpdateInterval { get; set; }
- [Reactive] public int TrayMenuServersLimit { get; set; }
- [Reactive] public string CurrentFontFamily { get; set; }
- [Reactive] public int SpeedTestTimeout { get; set; }
- [Reactive] public string SpeedTestUrl { get; set; }
- [Reactive] public string SpeedPingTestUrl { get; set; }
- [Reactive] public string UdpTestTarget { get; set; }
- [Reactive] public int MixedConcurrencyCount { get; set; }
- [Reactive] public bool EnableHWA { get; set; }
- [Reactive] public string SubConvertUrl { get; set; }
- [Reactive] public int MainGirdOrientation { get; set; }
- [Reactive] public string GeoFileSourceUrl { get; set; }
- [Reactive] public string SrsFileSourceUrl { get; set; }
- [Reactive] public string RoutingRulesSourceUrl { get; set; }
- [Reactive] public string IPAPIUrl { get; set; }
+ [Reactive] public partial bool AutoRun { get; set; }
+ [Reactive] public partial bool EnableStatistics { get; set; }
+ [Reactive] public partial bool KeepOlderDedupl { get; set; }
+ [Reactive] public partial bool DisplayRealTimeSpeed { get; set; }
+ [Reactive] public partial bool EnableAutoAdjustMainLvColWidth { get; set; }
+ [Reactive] public partial bool AutoHideStartup { get; set; }
+ [Reactive] public partial bool Hide2TrayWhenClose { get; set; }
+ [Reactive] public partial bool MacOSShowInDock { get; set; }
+ [Reactive] public partial bool EnableDragDropSort { get; set; }
+ [Reactive] public partial bool DoubleClick2Activate { get; set; }
+ [Reactive] public partial int AutoUpdateInterval { get; set; }
+ [Reactive] public partial int TrayMenuServersLimit { get; set; }
+ [Reactive] public partial string CurrentFontFamily { get; set; }
+ [Reactive] public partial int SpeedTestTimeout { get; set; }
+ [Reactive] public partial string SpeedTestUrl { get; set; }
+ [Reactive] public partial string SpeedPingTestUrl { get; set; }
+ [Reactive] public partial string UdpTestTarget { get; set; }
+ [Reactive] public partial int MixedConcurrencyCount { get; set; }
+ [Reactive] public partial bool EnableHWA { get; set; }
+ [Reactive] public partial string SubConvertUrl { get; set; }
+ [Reactive] public partial int MainGirdOrientation { get; set; }
+ [Reactive] public partial string GeoFileSourceUrl { get; set; }
+ [Reactive] public partial string SrsFileSourceUrl { get; set; }
+ [Reactive] public partial string RoutingRulesSourceUrl { get; set; }
+ [Reactive] public partial string IPAPIUrl { get; set; }
#endregion UI
#region UI visibility
- [Reactive] public bool BlIsWindows { get; set; }
- [Reactive] public bool BlIsLinux { get; set; }
- [Reactive] public bool BlIsIsMacOS { get; set; }
- [Reactive] public bool BlIsNonWindows { get; set; }
+ [Reactive] public partial bool BlIsWindows { get; set; }
+ [Reactive] public partial bool BlIsLinux { get; set; }
+ [Reactive] public partial bool BlIsIsMacOS { get; set; }
+ [Reactive] public partial bool BlIsNonWindows { get; set; }
#endregion UI visibility
#region System proxy
- [Reactive] public bool notProxyLocalAddress { get; set; }
- [Reactive] public string systemProxyAdvancedProtocol { get; set; }
- [Reactive] public string systemProxyExceptions { get; set; }
- [Reactive] public string CustomSystemProxyPacPath { get; set; }
- [Reactive] public string CustomSystemProxyScriptPath { get; set; }
+ [Reactive] public partial bool notProxyLocalAddress { get; set; }
+ [Reactive] public partial string systemProxyAdvancedProtocol { get; set; }
+ [Reactive] public partial string systemProxyExceptions { get; set; }
+ [Reactive] public partial string CustomSystemProxyPacPath { get; set; }
+ [Reactive] public partial string CustomSystemProxyScriptPath { get; set; }
#endregion System proxy
#region Tun mode
- [Reactive] public bool TunAutoRoute { get; set; }
- [Reactive] public bool TunStrictRoute { get; set; }
- [Reactive] public string TunStack { get; set; }
- [Reactive] public int TunMtu { get; set; }
- [Reactive] public bool TunEnableIPv6Address { get; set; }
- [Reactive] public string TunIcmpRouting { get; set; }
- [Reactive] public bool TunEnableLegacyProtect { get; set; }
+ [Reactive] public partial bool TunAutoRoute { get; set; }
+ [Reactive] public partial bool TunStrictRoute { get; set; }
+ [Reactive] public partial string TunStack { get; set; }
+ [Reactive] public partial int TunMtu { get; set; }
+ [Reactive] public partial bool TunEnableIPv6Address { get; set; }
+ [Reactive] public partial string TunIcmpRouting { get; set; }
+ [Reactive] public partial bool TunEnableLegacyProtect { get; set; }
#endregion Tun mode
#region CoreType
- [Reactive] public string CoreType1 { get; set; }
- [Reactive] public string CoreType2 { get; set; }
- [Reactive] public string CoreType3 { get; set; }
- [Reactive] public string CoreType4 { get; set; }
- [Reactive] public string CoreType5 { get; set; }
- [Reactive] public string CoreType6 { get; set; }
- [Reactive] public string CoreType7 { get; set; }
- [Reactive] public string CoreType9 { get; set; }
+ [Reactive] public partial string CoreType1 { get; set; }
+ [Reactive] public partial string CoreType2 { get; set; }
+ [Reactive] public partial string CoreType3 { get; set; }
+ [Reactive] public partial string CoreType4 { get; set; }
+ [Reactive] public partial string CoreType5 { get; set; }
+ [Reactive] public partial string CoreType6 { get; set; }
+ [Reactive] public partial string CoreType7 { get; set; }
+ [Reactive] public partial string CoreType9 { get; set; }
#endregion CoreType
diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs
index a4d9b298..4a862674 100644
--- a/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/ProfilesSelectViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class ProfilesSelectViewModel : MyReactiveObject
+public partial class ProfilesSelectViewModel : MyReactiveObject
{
#region private prop
@@ -22,15 +22,15 @@ public class ProfilesSelectViewModel : MyReactiveObject
public IObservableCollection SubItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public ProfileItemModel SelectedProfile { get; set; }
+ public partial ProfileItemModel SelectedProfile { get; set; }
public IList SelectedProfiles { get; set; }
[Reactive]
- public SubItem SelectedSub { get; set; }
+ public partial SubItem SelectedSub { get; set; }
[Reactive]
- public string ServerFilter { get; set; }
+ public partial string ServerFilter { get; set; }
// Include/Exclude filter for ConfigType
public List FilterConfigTypes
@@ -39,7 +39,6 @@ public class ProfilesSelectViewModel : MyReactiveObject
set => this.RaiseAndSetIfChanged(ref _filterConfigTypes, value);
}
- [Reactive]
public bool FilterExclude
{
get => _filterExclude;
diff --git a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs
index 88e8b679..70deea78 100644
--- a/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class ProfilesViewModel : MyReactiveObject
+public partial class ProfilesViewModel : MyReactiveObject
{
#region private prop
@@ -19,18 +19,18 @@ public class ProfilesViewModel : MyReactiveObject
public IObservableCollection SubItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public ProfileItemModel SelectedProfile { get; set; }
+ public partial ProfileItemModel SelectedProfile { get; set; }
public IList SelectedProfiles { get; set; }
[Reactive]
- public SubItem SelectedSub { get; set; }
+ public partial SubItem SelectedSub { get; set; }
[Reactive]
- public SubItem SelectedMoveToGroup { get; set; }
+ public partial SubItem SelectedMoveToGroup { get; set; }
[Reactive]
- public string ServerFilter { get; set; }
+ public partial string ServerFilter { get; set; }
#endregion ObservableCollection
diff --git a/v2rayN/ServiceLib/ViewModels/RoutingRuleDetailsViewModel.cs b/v2rayN/ServiceLib/ViewModels/RoutingRuleDetailsViewModel.cs
index e984ab64..f60e6ea0 100644
--- a/v2rayN/ServiceLib/ViewModels/RoutingRuleDetailsViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/RoutingRuleDetailsViewModel.cs
@@ -1,27 +1,27 @@
namespace ServiceLib.ViewModels;
-public class RoutingRuleDetailsViewModel : MyReactiveObject
+public partial class RoutingRuleDetailsViewModel : MyReactiveObject
{
public IList ProtocolItems { get; set; }
public IList InboundTagItems { get; set; }
[Reactive]
- public RulesItem SelectedSource { get; set; }
+ public partial RulesItem SelectedSource { get; set; }
[Reactive]
- public string Domain { get; set; }
+ public partial string Domain { get; set; }
[Reactive]
- public string IP { get; set; }
+ public partial string IP { get; set; }
[Reactive]
- public string Process { get; set; }
+ public partial string Process { get; set; }
[Reactive]
- public string? RuleType { get; set; }
+ public partial string? RuleType { get; set; }
[Reactive]
- public bool AutoSort { get; set; }
+ public partial bool AutoSort { get; set; }
public ReactiveCommand SaveCmd { get; }
diff --git a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs
index 3baf79c6..04753e90 100644
--- a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs
@@ -1,16 +1,16 @@
namespace ServiceLib.ViewModels;
-public class RoutingRuleSettingViewModel : MyReactiveObject
+public partial class RoutingRuleSettingViewModel : MyReactiveObject
{
private List _rules;
[Reactive]
- public RoutingItem SelectedRouting { get; set; }
+ public partial RoutingItem SelectedRouting { get; set; }
public IObservableCollection RulesItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public RulesItemModel SelectedSource { get; set; }
+ public partial RulesItemModel SelectedSource { get; set; }
public IList SelectedSources { get; set; }
diff --git a/v2rayN/ServiceLib/ViewModels/RoutingSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/RoutingSettingViewModel.cs
index 2075bb1e..14180eb5 100644
--- a/v2rayN/ServiceLib/ViewModels/RoutingSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/RoutingSettingViewModel.cs
@@ -1,21 +1,21 @@
namespace ServiceLib.ViewModels;
-public class RoutingSettingViewModel : MyReactiveObject
+public partial class RoutingSettingViewModel : MyReactiveObject
{
#region Reactive
public IObservableCollection RoutingItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public RoutingItemModel SelectedSource { get; set; }
+ public partial RoutingItemModel SelectedSource { get; set; }
public IList SelectedSources { get; set; }
[Reactive]
- public string DomainStrategy { get; set; }
+ public partial string DomainStrategy { get; set; }
[Reactive]
- public string DomainStrategy4Singbox { get; set; }
+ public partial string DomainStrategy4Singbox { get; set; }
public ReactiveCommand RoutingAdvancedAddCmd { get; }
public ReactiveCommand RoutingAdvancedRemoveCmd { get; }
diff --git a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs
index 0ce40dbb..ecaef7d3 100644
--- a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs
@@ -1,6 +1,6 @@
namespace ServiceLib.ViewModels;
-public class StatusBarViewModel : MyReactiveObject
+public partial class StatusBarViewModel : MyReactiveObject
{
private static readonly Lazy _instance = new(() => new(null));
public static StatusBarViewModel Instance => _instance.Value;
@@ -12,13 +12,13 @@ public class StatusBarViewModel : MyReactiveObject
public IObservableCollection Servers { get; } = new ObservableCollectionExtended();
[Reactive]
- public RoutingItem SelectedRouting { get; set; }
+ public partial RoutingItem SelectedRouting { get; set; }
[Reactive]
- public ComboItem SelectedServer { get; set; }
+ public partial ComboItem SelectedServer { get; set; }
[Reactive]
- public bool BlServers { get; set; }
+ public partial bool BlServers { get; set; }
#endregion ObservableCollection
@@ -34,16 +34,16 @@ public class StatusBarViewModel : MyReactiveObject
#region System Proxy
[Reactive]
- public bool BlSystemProxyClear { get; set; }
+ public partial bool BlSystemProxyClear { get; set; }
[Reactive]
- public bool BlSystemProxySet { get; set; }
+ public partial bool BlSystemProxySet { get; set; }
[Reactive]
- public bool BlSystemProxyNothing { get; set; }
+ public partial bool BlSystemProxyNothing { get; set; }
[Reactive]
- public bool BlSystemProxyPac { get; set; }
+ public partial bool BlSystemProxyPac { get; set; }
public ReactiveCommand SystemProxyClearCmd { get; }
public ReactiveCommand SystemProxySetCmd { get; }
@@ -51,44 +51,44 @@ public class StatusBarViewModel : MyReactiveObject
public ReactiveCommand SystemProxyPacCmd { get; }
[Reactive]
- public bool BlRouting { get; set; }
+ public partial bool BlRouting { get; set; }
[Reactive]
- public int SystemProxySelected { get; set; }
+ public partial int SystemProxySelected { get; set; }
[Reactive]
- public bool BlSystemProxyPacVisible { get; set; }
+ public partial bool BlSystemProxyPacVisible { get; set; }
#endregion System Proxy
#region UI
[Reactive]
- public string InboundDisplay { get; set; }
+ public partial string InboundDisplay { get; set; }
[Reactive]
- public string InboundLanDisplay { get; set; }
+ public partial string InboundLanDisplay { get; set; }
[Reactive]
- public string RunningServerDisplay { get; set; }
+ public partial string RunningServerDisplay { get; set; }
[Reactive]
- public string RunningServerToolTipText { get; set; }
+ public partial string RunningServerToolTipText { get; set; }
[Reactive]
- public string RunningInfoDisplay { get; set; }
+ public partial string RunningInfoDisplay { get; set; }
[Reactive]
- public string SpeedProxyDisplay { get; set; }
+ public partial string SpeedProxyDisplay { get; set; }
[Reactive]
- public string SpeedDirectDisplay { get; set; }
+ public partial string SpeedDirectDisplay { get; set; }
[Reactive]
- public bool EnableTun { get; set; }
+ public partial bool EnableTun { get; set; }
[Reactive]
- public bool BlIsNonWindows { get; set; }
+ public partial bool BlIsNonWindows { get; set; }
#endregion UI
diff --git a/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs b/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs
index 344f4ac8..e7daef6f 100644
--- a/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/SubEditViewModel.cs
@@ -1,9 +1,9 @@
namespace ServiceLib.ViewModels;
-public class SubEditViewModel : MyReactiveObject
+public partial class SubEditViewModel : MyReactiveObject
{
[Reactive]
- public SubItem SelectedSource { get; set; }
+ public partial SubItem SelectedSource { get; set; }
public ReactiveCommand SaveCmd { get; }
diff --git a/v2rayN/ServiceLib/ViewModels/SubSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/SubSettingViewModel.cs
index ce0f6fa7..998304b4 100644
--- a/v2rayN/ServiceLib/ViewModels/SubSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/SubSettingViewModel.cs
@@ -1,11 +1,11 @@
namespace ServiceLib.ViewModels;
-public class SubSettingViewModel : MyReactiveObject
+public partial class SubSettingViewModel : MyReactiveObject
{
public IObservableCollection SubItems { get; } = new ObservableCollectionExtended();
[Reactive]
- public SubItem SelectedSource { get; set; }
+ public partial SubItem SelectedSource { get; set; }
public IList SelectedSources { get; set; }
diff --git a/v2rayN/v2rayN.Desktop/FodyWeavers.xml b/v2rayN/v2rayN.Desktop/FodyWeavers.xml
deleted file mode 100644
index 63fc1484..00000000
--- a/v2rayN/v2rayN.Desktop/FodyWeavers.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/v2rayN/v2rayN.Desktop/GlobalUsings.cs b/v2rayN/v2rayN.Desktop/GlobalUsings.cs
index 3d6e1d8a..a75a0f26 100644
--- a/v2rayN/v2rayN.Desktop/GlobalUsings.cs
+++ b/v2rayN/v2rayN.Desktop/GlobalUsings.cs
@@ -23,7 +23,7 @@ global using Avalonia.Threading;
global using DynamicData;
global using ReactiveUI;
global using ReactiveUI.Avalonia;
-global using ReactiveUI.Fody.Helpers;
+global using ReactiveUI.SourceGenerators;
global using ServiceLib;
global using ServiceLib.Base;
global using ServiceLib.Common;
diff --git a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
index c84a2887..b5dd546a 100644
--- a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
+++ b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
@@ -5,13 +5,13 @@ using Semi.Avalonia;
namespace v2rayN.Desktop.ViewModels;
-public class ThemeSettingViewModel : MyReactiveObject
+public partial class ThemeSettingViewModel : MyReactiveObject
{
- [Reactive] public string CurrentTheme { get; set; }
+ [Reactive] public partial string CurrentTheme { get; set; }
- [Reactive] public int CurrentFontSize { get; set; }
+ [Reactive] public partial int CurrentFontSize { get; set; }
- [Reactive] public string CurrentLanguage { get; set; }
+ [Reactive] public partial string CurrentLanguage { get; set; }
public ThemeSettingViewModel()
{
diff --git a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
index fc60c249..4a7471c4 100644
--- a/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
+++ b/v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj
@@ -26,9 +26,7 @@
true
-
- true
-
+
diff --git a/v2rayN/v2rayN/FodyWeavers.xml b/v2rayN/v2rayN/FodyWeavers.xml
deleted file mode 100644
index 63fc1484..00000000
--- a/v2rayN/v2rayN/FodyWeavers.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/v2rayN/v2rayN/GlobalUsings.cs b/v2rayN/v2rayN/GlobalUsings.cs
index fb63f7eb..b5b85c55 100644
--- a/v2rayN/v2rayN/GlobalUsings.cs
+++ b/v2rayN/v2rayN/GlobalUsings.cs
@@ -21,7 +21,7 @@ global using DynamicData;
global using DynamicData.Binding;
global using ReactiveUI;
global using ReactiveUI.Builder;
-global using ReactiveUI.Fody.Helpers;
+global using ReactiveUI.SourceGenerators;
global using ServiceLib;
global using ServiceLib.Base;
global using ServiceLib.Common;
diff --git a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
index 1d2061cd..a5621235 100644
--- a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
+++ b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
@@ -5,7 +5,7 @@ using Microsoft.Win32;
namespace v2rayN.ViewModels;
-public class ThemeSettingViewModel : MyReactiveObject
+public partial class ThemeSettingViewModel : MyReactiveObject
{
private readonly PaletteHelper _paletteHelper = new();
@@ -13,13 +13,13 @@ public class ThemeSettingViewModel : MyReactiveObject
public IObservableCollection Swatches => _swatches;
[Reactive]
- public Swatch SelectedSwatch { get; set; }
+ public partial Swatch SelectedSwatch { get; set; }
- [Reactive] public string CurrentTheme { get; set; }
+ [Reactive] public partial string CurrentTheme { get; set; }
- [Reactive] public int CurrentFontSize { get; set; }
+ [Reactive] public partial int CurrentFontSize { get; set; }
- [Reactive] public string CurrentLanguage { get; set; }
+ [Reactive] public partial string CurrentLanguage { get; set; }
public ThemeSettingViewModel()
{
diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj
index 9fd0d788..a04be2da 100644
--- a/v2rayN/v2rayN/v2rayN.csproj
+++ b/v2rayN/v2rayN/v2rayN.csproj
@@ -15,9 +15,7 @@
-
- true
-
+