public decimal Calculate(CalculateDecimalsOperation calculateOperation) { switch (calculateOperation.Operation) { case Operation.Add: return(Add(calculateOperation.InputA, calculateOperation.InputB)); case Operation.Subtract: return(Subtract(calculateOperation.InputA, calculateOperation.InputB)); case Operation.Multiply: return(Multiply(calculateOperation.InputA, calculateOperation.InputB)); case Operation.Divide: return(Divide(calculateOperation.InputA, calculateOperation.InputB)); default: break; } throw new Exception("Operation Not Found"); }
public decimal Post(CalculateDecimalsOperation calculateOperation) { return(_mathEngine.Calculate(calculateOperation)); }