public static string FileToString(string templatePath, object data) { string template = File.ReadAllText(templatePath); FileSystemTemplateLocator templateLocator = GetTemplateLocator(templatePath); return(StringToString(template, data, templateLocator.GetTemplate)); }
public static void FileToFile(string templatePath, object data, string outputPath, Options options) { var reader = new StringReader(File.ReadAllText(templatePath)); FileSystemTemplateLocator templateLocator = GetTemplateLocator(templatePath); using (StreamWriter writer = File.CreateText(outputPath)) { Template(reader, data, writer, templateLocator.GetTemplate, options); } }