public void SetValue(string section, string key, string value)
{
// machine wide settings cannot be changed.
if (IsMachineWideSettings)
{
if (_next == null)
{
throw new InvalidOperationException(NuGetResources.Error_NoWritableConfig);
}
_next.SetValue(section, key, value);
return;
}
if (String.IsNullOrEmpty(section))
{
throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "section");
}
var sectionElement = GetOrCreateSection(_config.Root, section);
SetValueInternal(sectionElement, key, value);
Save();
}