protected override Expression Mutate2(IList <Expression> newOperands) { Type type; if (newOperands.Count > 0) { type = newOperands[0].Type; } else { type = Type; } var scopeExpression = new ScopeExpression(type, newOperands); scopeExpression.Tables = Tables; scopeExpression.Columns = Columns; scopeExpression.Where = Where; scopeExpression.OrderBy = OrderBy; scopeExpression.Group = Group; scopeExpression.Parent = Parent; scopeExpression.ExecuteMethodName = ExecuteMethodName; scopeExpression.Limit = Limit; scopeExpression.Offset = Offset; scopeExpression.OffsetAndLimit = OffsetAndLimit; return(scopeExpression); }
public ScopeExpression(ScopeExpression parentScopePiece) : base(ExpressionType, null, null) { Parent = parentScopePiece; // Tables and columns are empty, since the table/column lookup recurses to parentScopePiece Tables = new List <TableExpression>(); Columns = new List <ColumnExpression>(); // Local clauses Where = new List <Expression>(); OrderBy = new List <OrderByExpression>(); Group = new List <GroupExpression>(); }