Esempio n. 1
0
 public void LoadTemplateTest()
 {
     try
     {
         testSubject.LoadTemplate(templatePath); // test
     } catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
Esempio n. 2
0
        public string RenderPage(XmlConfig config)
        {
            if (config.templatePath == null)
            {
                throw new ArgumentNullException("Missing xslt template path. Set XsltTemplatePath for ILayoutService in controller's constructor");
            }

            StringWriter writer;

            xmlTransformer.LoadData(config.dataPath);
            xmlTransformer.LoadTemplate(config.templatePath);
            xmlTransformer.TransformTemplate(out writer);

            return(xmlTransformer.DecodeToString(writer));
        }