public JsonSettingsProvider(ISettingsWriter settingsWriter) { this.settingsWriter = settingsWriter; if (string.IsNullOrEmpty(settingsWriter.Get())) { this.settingsWriter.Save(JsonSerializer.Serialize(new Dictionary <string, object>(), this.serializationOptions)); } }
public string Get(string name) { if (settingsWriter != null) { var value = settingsWriter.Get(name); if (value != null) { return(value); } } return(settings.Get(name)); }
public string Get(string name) { var value = settingsWriter?.Get(name); return(value ?? settings.Get(name)); }
public string GetRaw(string key) { return(SettingsWriter.Get(key) ?? SettingsReader.Get(key)); }