public int Calculate(ICalcType ctype, int a, int b) { if (ctype == ICalcType.Multiply) { return(a * b); } else { return(this._next.Calculate(ctype, a, b)); } }
public int Calculate(ICalcType ctype, int a, int b) { if (ctype == ICalcType.Divide) { return(a / b); } else { return(this._next.Calculate(ctype, a, b)); } }
public int Calculate(ICalcType ctype, int a, int b) { if (ctype == ICalcType.Substract) { return(a - b); } else { return(this._next.Calculate(ctype, a, b)); } }