提交整体修改
This commit is contained in:
@ -101,7 +101,8 @@ namespace DH.Commons.Helper
|
||||
{
|
||||
ConfigModel.CameraBaseList,
|
||||
ConfigModel.PLCBaseList,
|
||||
ConfigModel.DetectionList
|
||||
ConfigModel.DetectionList,
|
||||
ConfigModel.GlobalList,
|
||||
}, _jsonOptions);
|
||||
|
||||
// 写入新配置
|
||||
@ -157,8 +158,9 @@ namespace DH.Commons.Helper
|
||||
var data = JsonSerializer.Deserialize<ConfigData>(json, _jsonOptions);
|
||||
|
||||
ConfigModel.CameraBaseList = data?.Cameras ?? new List<CameraBase>();
|
||||
ConfigModel.PLCBaseList = data?.PLCs ?? new List<PLCBase>();
|
||||
ConfigModel.DetectionList = data?.Detections ?? new List<DetectionConfig>();
|
||||
ConfigModel.PLCBaseList = data?.PLCs ?? new List<PLCBase>();
|
||||
ConfigModel.GlobalList = data?.GlobalConfigs ?? new List<GlobalConfig>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -261,6 +263,10 @@ namespace DH.Commons.Helper
|
||||
|
||||
[JsonPropertyName("detectionList")]
|
||||
public List<DetectionConfig> Detections { get; set; } = new List<DetectionConfig>();
|
||||
[JsonPropertyName("globalList")]
|
||||
public List<GlobalConfig> GlobalConfigs { get; set; } = new List<GlobalConfig>();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user