protected virtual void VisitArgs(MethodCallValue value) { IComparisonOperand[] args = value.Args; for (int i = 0; i < args.Length; ++i) { args[i].Accept(this); } }
public override bool Equals(object obj) { if (!base.Equals(obj)) { return(false); } Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.MethodCallValue casted = (Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.MethodCallValue )obj; return(_method.Equals(casted._method) && _callingConvention == casted._callingConvention); }
protected virtual void VisitArgs(MethodCallValue value) { var args = value.Args; for (var i = 0; i < args.Length; ++i) { args[i].Accept(this); } }
public virtual void Visit(MethodCallValue value) { value.Parent().Accept(this); VisitArgs(value); }
public virtual void Visit(MethodCallValue operand) { var method = operand.Method; var retType = method.ReturnType; // FIXME: this should be handled within conversions var needConversion = retType.IsPrimitive; operand.Parent().Accept(this); var oldInArithmetic = _inArithmetic; for (var paramIdx = 0; paramIdx < operand.Args.Length; paramIdx++) { _inArithmetic = operand.Method.ParamTypes[paramIdx].IsPrimitive; operand.Args[paramIdx].Accept(this); } _inArithmetic = oldInArithmetic; _methodBuilder.Invoke(method, operand.CallingConvention); Box(retType, !_inArithmetic && needConversion); }
public virtual void Visit(MethodCallValue operand) { _clazz = operand.Method.ReturnType; }
private object[] Args(MethodCallValue operand) { IComparisonOperand[] args = operand.Args; object[] @params = new object[args.Length]; for (int paramIdx = 0; paramIdx < args.Length; paramIdx++) { args[paramIdx].Accept(this); @params[paramIdx] = _value; } return @params; }
public void Visit(MethodCallValue operand) { operand.Parent().Accept(this); object receiver = _value; MethodInfo method = _resolver.Resolve(operand.Method); try { _value = method.Invoke(IsStatic(method) ? null : receiver, Args(operand)); } catch (Exception exc) { Sharpen.Runtime.PrintStackTrace(exc); _value = null; } }
private object[] Args(MethodCallValue operand) { var args = operand.Args; var @params = new object[args.Length]; for (var paramIdx = 0; paramIdx < args.Length; paramIdx++) { args[paramIdx].Accept(this); @params[paramIdx] = _value; } return @params; }