protected BlockCommand UpdateBlock(BlockCommand block, IList <Expression> commands)
 {
     if (block.Commands != commands)
     {
         return(new BlockCommand(commands));
     }
     return(block);
 }
 protected virtual bool CompareBlock(BlockCommand x, BlockCommand 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);
 }
        protected virtual Expression VisitBlock(BlockCommand block)
        {
            var commands = this.VisitExpressionList(block.Commands);

            return(this.UpdateBlock(block, commands));
        }