Esempio n. 1
0
        private async void btnEcho_Click(object sender, RoutedEventArgs e)
        {
            var window = new Windows.Echo {
                Owner = this
            };

            if (window.ShowDialog() ?? false)
            {
                try
                {
                    WriteLine("Method: Echo");
                    WriteLine("Request: {0}", window.Value);
                    var result = await Client.EchoAsync(new EchoData { Message = window.Value });

                    WriteLine("Response: {0}", result.Message);
                }
                catch (System.Exception ex)
                {
                    WriteLine("Error: {0}", ex.Message);
                }
            }
        }