Files
v2rayN/v2rayN/ServiceLib/Models/Dto/ProfileItemModel.cs
DHR60 d924c6f557 ReactiveUI 24 (#9678)
* ReactiveUI.SourceGenerators

* Primitives

* Try fix
2026-08-01 10:08:43 +08:00

55 lines
1.3 KiB
C#

namespace ServiceLib.Models.Dto;
[Serializable]
public partial class ProfileItemModel : ReactiveObject
{
public bool IsActive { get; set; }
public string IndexId { get; set; }
public EConfigType ConfigType { get; set; }
public string Remarks { get; set; }
public string Address { get; set; }
public int Port { get; set; }
public string Network { get; set; }
public string StreamSecurity { get; set; }
public string Subid { get; set; }
public string SubRemarks { get; set; }
public int Sort { get; set; }
[Reactive]
public partial int Delay { get; set; }
public decimal Speed { get; set; }
[Reactive]
public partial string DelayVal { get; set; }
[Reactive]
public partial string SpeedVal { get; set; }
[Reactive]
public partial string IpInfo { get; set; }
[Reactive]
public partial string TodayUp { get; set; }
[Reactive]
public partial string TodayDown { get; set; }
[Reactive]
public partial string TotalUp { get; set; }
[Reactive]
public partial string TotalDown { get; set; }
public string GetSummary()
{
var summary = $"[{ConfigType}] {Remarks}";
if (!ConfigType.IsComplexType())
{
summary += $"({Address}:{Port})";
}
return summary;
}
}