protected override System.Linq.Expressions.Expression VisitBlockHelperExpression(BlockHelperExpression bhex)
 {
     return(HandlebarsExpression.BlockHelper(
                bhex.HelperName,
                bhex.Arguments.Select(Visit),
                Visit(bhex.Body),
                Visit(bhex.Inversion)));
 }
Exemple #2
0
 public override Expression GetAccumulatedBlock()
 {
     if (_accumulatedBody == null)
     {
         _accumulatedBody      = Expression.Block(_body);
         _accumulatedInversion = Expression.Block(Expression.Empty());
     }
     else if (_accumulatedInversion == null && _body.Any())
     {
         _accumulatedInversion = Expression.Block(_body);
     }
     else
     {
         _accumulatedInversion = Expression.Block(Expression.Empty());
     }
     return(HandlebarsExpression.BlockHelper(
                _startingNode.HelperName,
                _startingNode.Arguments,
                _accumulatedBody,
                _accumulatedInversion));
 }