/// <summary> /// Calls an individual configurator to rewire itself /// </summary> /// <param name="node">The configurator.</param> private void RewireIndividualSection(INodeConfigRewireBase node) { XmlNode firstParent = this.xmlConfigRoot.SelectSingleNode(this.rootConfigNode).SelectSingleNode(this.configParents[node.ConfigParent]); XmlNode oldConfig = firstParent.SelectSingleNode(node.ConfigSectionName); XmlNode newConfig = (XmlNode)node.RewireConfig(oldConfig, true); XPathNavigator nav = firstParent.CreateNavigator(); if (oldConfig == null) { nav.AppendChild(newConfig.CreateNavigator()); } else { firstParent.ReplaceChild(newConfig, oldConfig); } }