refactor(agent): remove obsolete compatibility paths
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using WxAgent.Core;
|
||||
|
||||
namespace WxAgent.Service;
|
||||
@@ -21,27 +20,16 @@ public sealed class ServiceOptions
|
||||
public required string DataDirectory { get; init; }
|
||||
public RemoteAgentOptions? Remote { get; init; }
|
||||
public ReportingConfig Reporting { get; init; } = new();
|
||||
public string? RemoteConfigurationFile { get; init; }
|
||||
// Connection authorization covers data synchronization; validation writes remain separately gated.
|
||||
public bool EnableValidationOperations { get; init; }
|
||||
public bool EnableListenerEvents { get; init; }
|
||||
public bool PreventAutoLock { get; init; }
|
||||
// Kept as a compatibility switch for older service.json files; a configured Agent connection authorizes sync.
|
||||
public bool EnableDataSync { get; init; } = true;
|
||||
public int DataSyncIntervalSeconds { get; init; } = 5;
|
||||
public int DataSyncBatchLimit { get; init; } = 100;
|
||||
public int DataSyncOverlapRows { get; init; } = 1;
|
||||
public int DataSyncQueueMaxItems { get; init; } = 1000;
|
||||
public long DataSyncQueueMaxBytes { get; init; } = 16 * 1024 * 1024;
|
||||
|
||||
// Kept only so older service.json files can be loaded and rewritten by the tray.
|
||||
[JsonIgnore]
|
||||
[Obsolete("Internal compatibility field; the value is ignored.")]
|
||||
public int QueueCapacity { get; init; } = 100;
|
||||
[JsonIgnore]
|
||||
[Obsolete("Internal compatibility field; the value is ignored.")]
|
||||
public string ListenerSession { get; init; } = "文件传输助手";
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
if (!Uri.TryCreate(ListenUrl, UriKind.Absolute, out var uri) || uri.Scheme != "http" ||
|
||||
|
||||
Reference in New Issue
Block a user