public ActionResult <int> Get([FromServices] CalculatorSoap calculadora, TipoOperacion op, int arg1, int arg2)
        {
            switch (op)
            {
            case TipoOperacion.Add:
                return(calculadora.AddAsync(arg1, arg2).Result);

            case TipoOperacion.Subtract:
                return(calculadora.SubtractAsync(arg1, arg2).Result);

            case TipoOperacion.Multiply:
                return(calculadora.MultiplyAsync(arg1, arg2).Result);

            case TipoOperacion.Divide:
                return(calculadora.DivideAsync(arg1, arg2).Result);
            }
            return(0);
        }
Example #2
0
 public async Task <int> SubtractAsync(int NumOne, int NumTwo)
 {
     return(await calculatorSoap.SubtractAsync(NumOne, NumTwo));
 }
Example #3
0
 public async Task <int> SubtractAsync(int Num1, int Num2)
 {
     return(await calculatorSoap.SubtractAsync(Num1, Num2));
 }
 public async Task <int> SubtractAsync(int firstNum, int secondNum)
 {
     return(await _calculatorSoap.SubtractAsync(firstNum, secondNum));
 }