namespace IStation.Service
{
///
///
///
public partial class AnalysisFactor
{
private readonly string _filePath = Path.Combine(
Settings.ParasHelper.LocalFile.DataFolderDirectory,
Settings.ParasHelper.LocalFile.AnalysisFactorFile);
private List _list = null;
///
/// 获取
///
public List GetList()
{
if (_list == null)
{
if (!File.Exists(_filePath))
return default;
var json = File.ReadAllText(_filePath);
_list = JsonHelper.Json2Object>(json);
}
return _list;
}
///
/// 保存
///
///
///
public bool Save(List list)
{
_list = list;
var json = JsonHelper.Object2Json(list);
File.WriteAllText(_filePath, json);
return true;
}
}
}