static public ConfigurationSectionHandler CreateFromXml(XmlNode xmlContent) { ConfigurationSectionHandler section = new ConfigurationSectionHandler(); section.Init(); section.Reset(null); using (var reader = new XmlNodeReader(xmlContent)) { section.DeserializeSection(reader); } section.ResetModified(); return section; }
static public ConfigurationSectionHandler CreateFromXml(string xmlContent) { ConfigurationSectionHandler section = new ConfigurationSectionHandler(); section.Init(); section.Reset(null); using (var reader = new XmlTextReader(new StringReader(xmlContent.Trim()))) { section.DeserializeSection(reader); } section.ResetModified(); return section; }
static public ConfigurationSectionHandler CreateFromXml(XmlNode xmlContent) { ConfigurationSectionHandler section = new ConfigurationSectionHandler(); section.Init(); section.Reset(null); using (var reader = new XmlNodeReader(xmlContent)) { section.DeserializeSection(reader); } section.ResetModified(); return(section); }
static public ConfigurationSectionHandler CreateFromXml(string xmlContent) { ConfigurationSectionHandler section = new ConfigurationSectionHandler(); section.Init(); section.Reset(null); using (var reader = new XmlTextReader(new StringReader(xmlContent.Trim()))) { section.DeserializeSection(reader); } section.ResetModified(); return(section); }