예제 #1
0
 async void OnSetString(object sender, RoutedEventArgs e)
 {
     if (await AtTestRpc.SetString("abc"))
     {
         _tbInfo.Text = "OnSetString成功";
     }
 }
예제 #2
0
        async void OnServerStream(object sender, RoutedEventArgs e)
        {
            _tbInfo.Text = "ServerStream模式:";
            var _reader = await AtTestRpc.OnServerStream("hello");

            while (await _reader.MoveNext())
            {
                _tbInfo.Text += $"{Environment.NewLine}收到:{_reader.Val<string>()}";
            }
            _tbInfo.Text += Environment.NewLine + "结束";
        }
예제 #3
0
 async void OnGetString(object sender, RoutedEventArgs e)
 {
     _tbInfo.Text = "返回:" + await AtTestRpc.GetString();
 }