Esempio n. 1
0
        /// <summary>
        /// Visits the batch.
        /// </summary>
        /// <param name="batch">The batch.</param>
        /// <returns></returns>
        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));
        }
Esempio n. 2
0
        /// <summary>
        /// Updates the batch.
        /// </summary>
        /// <param name="batch">The batch.</param>
        /// <param name="input">The input.</param>
        /// <param name="operation">The operation.</param>
        /// <param name="batchSize">Size of the batch.</param>
        /// <param name="stream">The stream.</param>
        /// <returns></returns>
        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);
        }
Esempio n. 3
0
 /// <summary>
 /// Visits the batch.
 /// </summary>
 /// <param name="batch">The batch.</param>
 /// <returns></returns>
 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);
 }
Esempio n. 4
0
 /// <summary>
 /// Compares the batch.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <returns></returns>
 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));
 }