public void Save(OptionsContainer settings) { var json = settings.SerializeToJson(); if (!_settingsStore.CollectionExists(SETTINGS_STORE_NAME)) { _settingsStore.CreateCollection(SETTINGS_STORE_NAME); } _settingsStore.SetString(SETTINGS_STORE_NAME, "Settings", json); }
public void SaveAs(OptionsContainer settings, string path) { var json = settings.SerializeToJson(); File.WriteAllText(path, json); }