public CalcResponse ExecuteBinaryOperation(BinaryCalcRequest request) { var command1 = CreateCommand(CommandType.Add, request.Operand1); var command2 = CreateCommand(request.CommandType, request.Operand2); return(new CalcResponse() { Result = Run(new Command[] { command1, command2 }) }); }
public IActionResult BinaryOperation([FromQuery] BinaryCalcRequest request) { return(Ok(_pangoCalculator.ExecuteBinaryOperation(request))); }