コード例 #1
0
 // How do we make this version asynchronous?
 private async void ButtonAsync_Click(object sender, RoutedEventArgs e)
 {
     this.Results.Clear();
     using (var compositeClient = new CompositeService.CompositeServiceClient())
     {
         List<string> results = await compositeClient.GetQuotesAsync(5);
         foreach (var result in results)
             this.Results.Add(result);
     }
 }
コード例 #2
0
 private void ButtonSync_Click(object sender, RoutedEventArgs e)
 {
     this.Results.Clear();
     using (var client = new CompositeService.CompositeServiceClient())
     {
         var results = client.GetQuotes(5);
         foreach (var r in results)
             this.Results.Add(r);
     }
 }