Exemplo n.º 1
0
        void LoadTemplates(String templateDir, String[] lines)
        {
            var templatesConfigLines = lines.Where(l => !l.Contains("="));

            foreach (var l in templatesConfigLines)
            {
                if (!String.IsNullOrWhiteSpace(l) && !l.StartsWith("#"))
                {
                    var tc = new TemplateConfig(l);
                    //load template
                    tc.TemplateString = File.ReadAllText(Path.Combine(templateDir, tc.Name));
                    TemplateConfigs.Add(tc);
                }
            }
        }
Exemplo n.º 2
0
 public static String GetTemplateStringFile(String templateName, TemplateConfig config)
 {
     return(Path.Combine(Path.Combine(TEMPLATE_FOLDER, templateName), config.Name));
 }
Exemplo n.º 3
0
 public static String LoadTemplateString(String templateName, TemplateConfig config)
 {
     return(File.ReadAllText(Path.Combine(Path.Combine(TEMPLATE_FOLDER, templateName), config.Name)));
 }