private Expression GenerateBinaryExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
 {
     if (arguments.get_Count() != 2)
     {
         throw new Exception("Invalid number of arguments for binary expression.");
     }
     return(new BinaryExpression(DynamicHelper.GetBinaryOperator(callSiteInfo.get_Operator()), arguments.get_Item(0), arguments.get_Item(1), this.objectTypeRef, this.typeSystem, instructions, false));
 }
示例#2
0
        private Expression GenerateBinaryExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
        {
            if (arguments.Count != 2)
            {
                throw new Exception("Invalid number of arguments for binary expression.");
            }

            return(new BinaryExpression(
                       DynamicHelper.GetBinaryOperator(callSiteInfo.Operator),
                       arguments[0],
                       arguments[1],
                       objectTypeRef,
                       typeSystem, instructions
                       ));
        }