public void Remove(string sectionName, SettingItem item) { if (item is AddItem addItem) { DeleteValue(sectionName, addItem.Key); return; } Log.Debug($"Cannot remove unknown item of type {item.GetType()}"); }
public void AddOrUpdate(string sectionName, SettingItem item) { Argument.IsNotNullOrWhitespace(() => sectionName); EnsureSectionExists(sectionName); var section = GetSection(sectionName); if (item is AddItem addItem) { SetValue(sectionName, addItem.Key, addItem.Value); return; } Log.Debug($"Cannot add or update unknown item of type {item.GetType()}"); }