private Expression GenerateUnaryExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
 {
     if (arguments.get_Count() != 1)
     {
         throw new Exception("Invalid number of arguments for unary expression.");
     }
     if (callSiteInfo.get_Operator() == 83)
     {
         return(arguments.get_Item(0));
     }
     return(new UnaryExpression(DynamicHelper.GetUnaryOperator(callSiteInfo.get_Operator()), arguments.get_Item(0), instructions));
 }
 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));
 }