protected void PopulateArguments(Context cx, QueryCall callExpr, int child) { foreach (var e in arguments) { Expression.Create(cx, e, callExpr, child++); } }
public Expression Populate(Context cx, IExpressionParentEntity parent, int child) { if (declaration != null) // The first "from" clause, or a "let" clause { if (operand == null) { return(DeclareRangeVariable(cx, parent, child, true)); } else { if (method == null) { cx.ModelError(node, "Unable to determine target of query expression"); } var callExpr = new QueryCall(cx, method, node, parent, child); operand.Populate(cx, callExpr, 0); DeclareRangeVariable(cx, callExpr, 1, false); PopulateArguments(cx, callExpr, 2); DeclareIntoVariable(cx, callExpr, 2 + arguments.Count, false); return(callExpr); } } else { var callExpr = new QueryCall(cx, method, node, parent, child); operand.Populate(cx, callExpr, 0); PopulateArguments(cx, callExpr, 1); return(callExpr); } }
public override Expression Populate(Context cx, IExpressionParentEntity parent, int child) { var callExpr = new QueryCall(cx, method, node, parent, child); operand.Populate(cx, callExpr, 0); PopulateArguments(cx, callExpr, 1); return(callExpr); }
public override Expression Populate(Context cx, IExpressionParentEntity parent, int child) { if (method == null) { cx.ModelError(node, "Unable to determine target of query expression"); } var callExpr = new QueryCall(cx, method, node, parent, child); operand.Populate(cx, callExpr, 0); DeclareRangeVariable(cx, callExpr, 1, false, declaration, name); PopulateArguments(cx, callExpr, 2); DeclareIntoVariable(cx, callExpr, 2 + arguments.Count, false); return(callExpr); }