Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }