private bool SaveToFile(object node, string path) { try { ConfigDatabase.SaveToFile(node, path); } catch (Exception e) { LastApplyException = e; return(false); } return(true); }
public bool Save() { if (_configData == null || _configDataJsonNode == null) { _errorOutput.WriteLine("Error: Database not loaded"); return(false); } ConfigDatabase.SaveToFile(_configDataJsonNode, _fileSourceSettings.DatabaseFilePath); foreach (var pair in _configDataTranslateJsonNodes) { var path = _fileSourceSettings.DatabaseTranslateFilePath(pair.Key); ConfigDatabase.SaveToFile(pair.Value, path); } return(true); }