System.Dynamic.DynamicObject.MetaDynamic.BuildCallArgs C# (CSharp) Method

BuildCallArgs() private static method

Helper method for generating arguments for calling methods on DynamicObject. parameters is either a list of ParameterExpressions to be passed to the method as an object[], or NoArgs to signify that the target method takes no object[] parameter.
private static BuildCallArgs ( DynamicMetaObjectBinder binder, Expression parameters, Expression arg0, Expression arg1 ) : System.Linq.Expressions.Expression[]
binder DynamicMetaObjectBinder
parameters System.Linq.Expressions.Expression
arg0 System.Linq.Expressions.Expression
arg1 System.Linq.Expressions.Expression
return System.Linq.Expressions.Expression[]
            private static Expression[] BuildCallArgs(DynamicMetaObjectBinder binder, Expression[] parameters, Expression arg0, Expression arg1) {
                if (!object.ReferenceEquals(parameters, NoArgs))
                    return arg1 != null ? new Expression[] { Constant(binder), arg0, arg1 } : new Expression[] { Constant(binder), arg0 };
                else
                    return arg1 != null ? new Expression[] { Constant(binder), arg1 } : new Expression[] { Constant(binder) };
            }