protected BlockCommandExpression UpdateBlock(BlockCommandExpression block, IList<Expression> commands) { if (block.Commands != commands) { return new BlockCommandExpression(commands); } return block; }
protected override Expression VisitBlock(BlockCommandExpression block) { throw new NotSupportedException(); }
protected virtual Expression VisitBlock(BlockCommandExpression block) { var commands = this.VisitExpressionList(block.Commands); return this.UpdateBlock(block, commands); }
protected virtual bool CompareBlock(BlockCommandExpression x, BlockCommandExpression y) { if (x.Commands.Count != y.Commands.Count) return false; for (int i = 0, n = x.Commands.Count; i < n; i++) { if (!this.Compare(x.Commands[i], y.Commands[i])) return false; } return true; }