public virtual void Set(string key, object value) { value.ShouldNotBeNull("value"); if (Get(key) == null) { Add(key, value.ToString()); } else { keys[key] = value.ToString(); } if (ConfigSource.AutoSave) { ConfigSource.Save(); } OnKeySet(new ConfigKeyEventArgs(key, value.ToString())); }
/// <include file='IConfig.xml' path='//Method[@name="Set"]/docs/*' /> public virtual void Set(string key, object value) { if (value == null) { throw new ArgumentNullException("Value cannot be null"); } if (Get(key) == null) { this.Add(key, value.ToString()); } else { keys[key] = value.ToString(); } if (ConfigSource.AutoSave) { ConfigSource.Save(); } OnKeySet(new ConfigKeyEventArgs(key, value.ToString())); }
public bool Save(string uri) { ConfigSource.Save(uri); return(false); }
public void SaveConfigFile() { ConfigSource.Save(FullConfigPath); }