示例#1
0
 public int Calculate(ICalcType ctype, int a, int b)
 {
     if (ctype == ICalcType.Multiply)
     {
         return(a * b);
     }
     else
     {
         return(this._next.Calculate(ctype, a, b));
     }
 }
示例#2
0
 public int Calculate(ICalcType ctype, int a, int b)
 {
     if (ctype == ICalcType.Divide)
     {
         return(a / b);
     }
     else
     {
         return(this._next.Calculate(ctype, a, b));
     }
 }
示例#3
0
 public int Calculate(ICalcType ctype, int a, int b)
 {
     if (ctype == ICalcType.Substract)
     {
         return(a - b);
     }
     else
     {
         return(this._next.Calculate(ctype, a, b));
     }
 }