protected BatchExpression UpdateBatch(BatchExpression batch, Expression input, LambdaExpression operation, Expression batchSize, Expression stream)
 {
     if (input != batch.Input || operation != batch.Operation || batchSize != batch.BatchSize || stream != batch.Stream)
     {
         return new BatchExpression(input, operation, batchSize, stream);
     }
     return batch;
 }
 protected virtual bool CompareBatch(BatchExpression x, BatchExpression y)
 {
     return this.Compare(x.Input, y.Input) && this.Compare(x.Operation, y.Operation)
         && this.Compare(x.BatchSize, y.BatchSize) && this.Compare(x.Stream, y.Stream);
 }
 protected virtual Expression VisitBatch(BatchExpression batch)
 {
     var operation = (LambdaExpression)this.Visit(batch.Operation);
     var batchSize = this.Visit(batch.BatchSize);
     var stream = this.Visit(batch.Stream);
     return this.UpdateBatch(batch, batch.Input, operation, batchSize, stream);
 }
 protected virtual Expression VisitBatch(BatchExpression batch)
 {
     this.Write("Batch(");
     this.WriteLine(Indentation.Inner);
     this.Visit(batch.Input);
     this.Write(",");
     this.WriteLine(Indentation.Same);
     this.Visit(batch.Operation);
     this.Write(",");
     this.WriteLine(Indentation.Same);
     this.Visit(batch.BatchSize);
     this.Write(", ");
     this.Visit(batch.Stream);
     this.WriteLine(Indentation.Outer);
     this.Write(")");
     return batch;
 }