Exemplo n.º 1
0
        static void RunProxy02(string endpointAddress, int x, int y)
        {
            Console.WriteLine("Run Proxy02 {");

            var client = new CalculatorServiceClient(CalculatorServiceClient.EndpointConfiguration.BasicHttpBinding_ICalculatorService, endpointAddress);

            Console.WriteLine($"  {x} + {y} == {client.AddAsync(x, y).Result}");
            Console.WriteLine($"  {x} - {y} == {client.SubtractAsync(x, y).Result}");
            Console.WriteLine($"  {x} * {y} == {client.MultiplyAsync(x, y).Result}");
            Console.WriteLine($"  {x} / {y} == {client.DivideAsync(x, y).Result}");
            Console.WriteLine("}");
        }