public void DeleteConfigValue(string configname) { ConfigValue configValue = ConfigValues.FirstOrDefault(t => t.ConfigName == configname); if (configValue != null) { ConfigValues.Remove(configValue); } SaveConfig(); }
internal void RemoveProperty(string propertyName) { if (ConfigValues.ContainsKey(propertyName) == true) { //remove Property to ConfigValues ConfigValues.Remove(propertyName); //update also definition just for consistency if (m_configWrapperDefinition != null) { m_configWrapperDefinition.RemoveProperty(propertyName); } } }
/// <summary> /// Method that stes configuration values into ConfigValues List /// </summary> /// <param name="name">Configuration name</param> /// <param name="value">Value</param> private void SetConfigValues( string name, object value ) { var configValues = ConfigValues.Where(x => x.Key == name).SingleOrDefault(); if (configValues.IsDefault()) { ConfigValues.Add(name, value); } else { ConfigValues.Remove(name); ConfigValues.Add(name, value); } }