public void SetValue(string sectionName, string key, bool value) { string val = value ? "1" : "0"; IniSection section = GetOrCreateSection(sectionName); section.AddValue(key, val); }
public void SetJson <T>(string sectionName, string key, T value) where T : class, new() { string json; if (value != null) { json = JsonSerializer.Serialize(value); } else { json = string.Empty; } IniSection section = GetOrCreateSection(sectionName); section.AddValue(key, json); }
public void SetValue(string sectionName, string key, int value) { IniSection section = GetOrCreateSection(sectionName); section.AddValue(key, value.ToString(CultureInfo.InvariantCulture)); }
public void SetValue(string sectionName, string key, string value) { IniSection section = GetOrCreateSection(sectionName); section.AddValue(key, value); }