using XFEExtension.NetCore.CyberComm;
namespace XFEExtension.NetCore.ServerInteractive.Options;
///
/// XFE服务器核心选项
///
public class XFEServerCoreOptions
{
///
/// 绑定的IP地址(服务初始化执行完成后才会刷新)
///
public List BindingIPAddress { get; set; } = [];
///
/// 核心服务器名称
///
public string ServerCoreName { get; set; } = string.Empty;
///
/// 是否自动对Json字符串进行反转义处理,默认为true
///
public bool AutoUnescapeJson { get; set; } = true;
///
/// 是否接收非标准的Json字符串,默认为true
///
public bool AcceptNonStandardJson { get; set; } = true;
///
/// 获取IP地址的函数,默认为从请求事件参数中获取客户端IP地址
///
public Func GetIPFunction { get; set; } = args => args.ClientIP;
///
/// 主入口点路径(ServerCore主要入口点),默认为空字符串(为空时直接使用次级入口点)
///
public string MainEntryPoint { get; set; } = string.Empty;
///
/// 绑定IP地址
///
///
///
public XFEServerCoreOptions BindIP(string ipAddress)
{
BindingIPAddress.Add(ipAddress);
return this;
}
}