public TemplateParser(System.IO.FileInfo templateFile, TemplateSettings settings) { if (templateFile == null) throw new ArgumentNullException("templateFile"); if (!templateFile.Exists) throw new System.IO.FileNotFoundException(string.Format("The template file '{0}' can not be found.", templateFile.Name)); if (settings == null) throw new ArgumentNullException("settings"); using (var fs = templateFile.OpenText()) { this.content = fs.ReadToEnd(); } this.settings = settings; }
public TemplateParser(string templateContent, TemplateSettings settings) { this.content = templateContent; this.settings = settings; }
public TemplateParser(string templateContent) { this.content = templateContent; this.settings = TemplateSettings.Default; }