예제 #1
0
        public decimal MakeCalculation(decimal x, decimal y, OperationType type)
        {
            if (type == OperationType)
            {
                return(Calculate(x, y));
            }

            if (Next != null)
            {
                return(Next.MakeCalculation(x, y, type));
            }

            throw new Exception("Calculation not possible.");
        }