public SubTemplate(XmlElement xml) { name = xml.GetAttribute("Name"); masterTemplateName = xml.GetAttribute("Master"); foreach (XmlElement xmlreplace in xml.SelectNodes("Replace[@Section]")) { TemplateSectionReplacement replacement = new TemplateSectionReplacement(xmlreplace); if (replacedSections.ContainsKey(replacement.Name)) { throw new Exception("Error building subpage template. There is more than one replacement defined for section \"" + replacement.Name + "\""); } replacedSections.Add(replacement.Name, replacement); } }
public SubTemplate(XmlElement xml) { name = xml.GetAttribute("Name"); masterTemplateName = xml.GetAttribute("Master"); foreach (XmlElement xmlreplace in xml.SelectNodes("Replace[@Section]")) { TemplateSectionReplacement replacement = new TemplateSectionReplacement(xmlreplace); if (replacedSections.ContainsKey(replacement.Name)) throw new Exception("Error building subpage template. There is more than one replacement defined for section \"" + replacement.Name + "\""); replacedSections.Add(replacement.Name, replacement); } }