Files
v2rayN/v2rayN/ServiceLib/Models/Dto/ProfileItemModel.cs
T
DHR60 78b0b2224b Native Aot (#10295)
* Protect models

* Json Context

* YAML AOT-friendly optimization

* Run the Test in AOT mode

* Remove TaskScheduler

* Clean build output

* Workflows
2026-11-01 20:29:06 +08:00

54 lines
1.3 KiB
C#

namespace ServiceLib.Models.Dto;
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;
}
}