Пример #1
0
 protected virtual Expression VisitIf(IfCommandExpression ifx)
 {
     var check = this.Visit(ifx.Check);
     var ifTrue = this.Visit(ifx.IfTrue);
     var ifFalse = this.Visit(ifx.IfFalse);
     return this.UpdateIf(ifx, check, ifTrue, ifFalse);
 }
Пример #2
0
 protected override Expression VisitIf(IfCommandExpression ifx)
 {
     throw new NotSupportedException();
 }
Пример #3
0
 protected IfCommandExpression UpdateIf(IfCommandExpression ifx, Expression check, Expression ifTrue, Expression ifFalse)
 {
     if (check != ifx.Check || ifTrue != ifx.IfTrue || ifFalse != ifx.IfFalse)
     {
         return new IfCommandExpression(check, ifTrue, ifFalse);
     }
     return ifx;
 }
Пример #4
0
 protected virtual bool CompareIf(IfCommandExpression x, IfCommandExpression y)
 {
     return this.Compare(x.Check, y.Check) && this.Compare(x.IfTrue, y.IfTrue) && this.Compare(x.IfFalse, y.IfFalse);
 }