public override string Render(TemplateItem item) { var evaluation = new ExpressionEvaluator(item).Evaluate(Expression); return EachValueOf(evaluation) .Aggregate(new StringBuilder(), (s, t) => s.Append(Content.Render(t))) .ToString(); }
public override string Render(TemplateItem item) { var enumerable = item.Data as IEnumerable; if(enumerable == null) return Content.Render(item); return enumerable.Cast<object>() .Aggregate(new StringBuilder(), (sb, obj) => { item.Data = obj; return sb.Append(Content.Render(item)); }) .ToString(); }
public override string Render(TemplateItem item) { return _children .Aggregate(new StringBuilder(), (sb, t) => sb.Append(t.Render(item))) .ToString(); }
public EvaluatedExpression(TemplateItem item, object value) { _item = item; _value = value; }
public override string Render(TemplateItem item) { return HttpUtility.HtmlEncode(new ExpressionEvaluator(item).Evaluate(Expression)); }
public ExpressionEvaluator(TemplateItem item) { _item = item; }