private Expression GenerateGetMemberExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
 {
     if (arguments.get_Count() != 1)
     {
         throw new Exception("Invalid number of arguments for get member expression.");
     }
     return(new DynamicMemberReferenceExpression(arguments.get_Item(0), callSiteInfo.get_MemberName(), this.objectTypeRef, instructions));
 }
 private Expression GenerateInvokeMemeberExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
 {
     if (arguments.get_Count() < 1)
     {
         throw new Exception("Invalid number of arguments for invoke expression.");
     }
     if (arguments.get_Item(0).get_CodeNodeType() != 19 || !(arguments.get_Item(0) as MethodInvocationExpression).IsTypeOfExpression(out V_1))
     {
         V_0 = arguments.get_Item(0);
     }
     else
     {
         V_0 = new TypeReferenceExpression(V_1, arguments.get_Item(0).get_UnderlyingSameMethodInstructions());
     }
     return(new DynamicMemberReferenceExpression(V_0, callSiteInfo.get_MemberName(), this.objectTypeRef, instructions, this.GetAllButFirst(arguments), callSiteInfo.get_GenericTypeArguments()));
 }
 private Expression GenerateSetMemberExpression(CallSiteInfo callSiteInfo, IList <Expression> arguments, IEnumerable <Instruction> instructions)
 {
     if (arguments.get_Count() != 2)
     {
         throw new Exception("Invalid number of arguments for set index expression.");
     }
     return(new BinaryExpression(26, new DynamicMemberReferenceExpression(arguments.get_Item(0), callSiteInfo.get_MemberName(), this.objectTypeRef, instructions), arguments.get_Item(1), this.typeSystem, null, false));
 }