// 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); } }
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); } }