Пример #1
0
 protected BlockCommand UpdateBlock(BlockCommand block, IList <Expression> commands)
 {
     if (block.Commands != commands)
     {
         return(new BlockCommand(commands));
     }
     return(block);
 }
Пример #2
0
 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);
 }
Пример #3
0
        protected virtual Expression VisitBlock(BlockCommand block)
        {
            var commands = this.VisitExpressionList(block.Commands);

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