public override TemplateToken CreateToken(ITokenMatcher tokenMatcher, string token)
        {
            TemplateTokenMatcher matcher = (TemplateTokenMatcher)tokenMatcher;

            if (matcher != null && matcher.TokenType == TemplateTokenType.ForEach)
            {
                string[] pieces = token.Split('\0');

                return(new ForeachTemplateToken(matcher, pieces[0], pieces[1]));
            }
            else
            {
                return(new TemplateToken(matcher, token));
            }
        }
Exemple #2
0
 public TemplateToken(TemplateTokenMatcher tokenMatcher, string token) : base(tokenMatcher, token)
 {
 }
 public ForeachTemplateToken(TemplateTokenMatcher tokenMatcher, string iterator, string expression) : base(tokenMatcher, expression)
 {
     _iterator = iterator;
 }
 public ForeachTemplateToken(TemplateTokenMatcher tokenMatcher, string iterator, string expression) : base(tokenMatcher, expression)
 {
     _iterator = iterator;
 }
Exemple #5
0
 public TemplateToken(TemplateTokenMatcher tokenMatcher, string token) : base(tokenMatcher, token)
 {
 }