public void UnloadConfiguration(OptionConfiguration configuration) { if (configuration == null) { return; } foreach (var section in configuration.Sections) { foreach (var elementName in section.Children.Keys) { var node = _root.Find(section.Path, elementName); if (node != null) { var option = node.Option; if (option != null && option.Provider == configuration) { node.Option = null; var parent = node.Parent; if (parent != null) { parent.Children.Remove(node); } } } } } }