private List <TokenMatch> InternalParse(string template, TemplateConfig config) { List <TokenMatch> tokenMatches = new List <TokenMatch>(); Regex regex = config.Regex; foreach (Match match in regex.Matches(template)) { TokenMatch tokenMatch = config.FindTokenMatch(match); if (tokenMatch != null) { tokenMatches.Add(tokenMatch); } } return(tokenMatches); }
public TemplateEngine(TemplateConfig config, IExpressionParser expressionParser) { _Config = config; _ExpressionParser = expressionParser; }
public TemplateParser(TemplateConfig config) { _Config = config; }