コード例 #1
0
        public override async Task VisitAsync(TernaryExpression expression)
        {
            // Evaluates the left expression and saves the value
            await expression.LeftExpression.AcceptAsync(this);

            bool left = Convert.ToBoolean(Result);

            if (left)
            {
                await expression.MiddleExpression.AcceptAsync(this);
            }
            else
            {
                await expression.RightExpression.AcceptAsync(this);
            }
        }
コード例 #2
0
 public abstract Task VisitAsync(TernaryExpression expression);