Esempio n. 1
0
        public static Expression Coalesce(LambdaBuilder builder, Expression left, Expression right)
        {
            Expression result = Coalesce(left, right, out ParameterExpression temp);

            builder.AddHiddenVariable(temp);
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// False coalescing expression.
        /// {result} ::= IsTrue(tmp = {left}) ? tmp : {right}
        /// Generalized OR semantics.
        /// </summary>
        public static Expression CoalesceFalse(LambdaBuilder builder, Expression left, Expression right, MethodInfo isTrue)
        {
            ContractUtils.RequiresNotNull(isTrue, nameof(isTrue));
            Expression result = CoalesceFalse(left, right, isTrue, out ParameterExpression temp);

            builder.AddHiddenVariable(temp);
            return(result);
        }