private static async Task EchoAsync()
        {
            try
            {
                var message = await pos.EchoAsync(new EchoRequest
                {
                    Message = "message"
                });

                if (message.Message != "message")
                {
                    throw new Exception("echo failed");
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
            }
        }
Ejemplo n.º 2
0
        private static async Task ExecuteEchoAsync(string message)
        {
            try
            {
                var result = await _pos.EchoAsync(new EchoRequest
                {
                    Message = message
                });

                if (result.Message != message)
                {
                    throw new Exception("The Echo request did not return the expected result.");
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex);
            }
        }
 public Task <EchoResponse> EchoAsync(EchoRequest message) => _innerPOS.EchoAsync(message);