Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7817849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:22:51+00:00 2026-06-02T06:22:51+00:00

Hello this is my first question here, I create a Web Service that is

  • 0

Hello this is my first question here, I create a Web Service that is hosted on Azure… And I have a Windows phone client application and a windows 8 metro client application, now when I connected the wp7 application I used these methods to get something from the service on windows phone:

        TimeTierBusiness.BusinessesClient client = new TimeTierBusiness.BusinessesClient();

        client.GetAllCompleted += new EventHandler<TimeTierBusiness.GetAllCompletedEventArgs>(client_GetAllCompleted);
        client.GetAllAsync();

and to get the result I simply go to the client_GetAllCompleted as you can see below:

    void client_GetAllCompleted(object sender, TimeTierBusiness.GetAllCompletedEventArgs e)
    {
        listNearbyBusinesses.ItemsSource = e.Result;
        myPopup.IsOpen = false;
    }

Now on the windows 8 metro, there is no GetAllCompleted event which I can add to get a result, when I call the client on windows 8 all i get is the GetAllAsync() method which is awaitable…

any help would be much appreciated, as I can’t use this service on my metro app right now

Thanks 🙂

ok so the solution was, to create an async method, see the code below:

        //My WCF Service Client
        TimeTierBusiness.BusinessesClient bClient = new TimeTierBusiness.BusinessesClient();
        //The list I am going to get from the service
        public List<TimeTierBusiness.BusinessRatingViewModel> listBusinessViewModel;

This method to fill the list from the service asynchronously

       private async void GetAllAsyc()
    {

        System.Collections.ObjectModel.ObservableCollection<TimeTierBusiness.BusinessRatingViewModel> x = await bClient.GetAllAsync();
        listBusinessViewModel = x.ToList();
        ItemListView.ItemsSource = listBusinessViewModel;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T06:22:53+00:00Added an answer on June 2, 2026 at 6:22 am

    Windows 8 (actually, the .NET 4.5 that comes with it) has one of the most geek-boner enducing feature of all time.. It’s based on the await/async keywords and it essentially allows you to write asynchronous code as if it’s synchronous. Both at work and for pet projects, I end up doing a ton of async code and after seeing this feature, I decided that my next child to be born will be given to the .NET guys as a sacrifice (because the feature is just that good and because I already have 3 kids and don’t really want another one).

    The jist of it is that you write the code for calling your async service (in this case) much like you would a regular method, but instead of hooking an event for completion, you simply “await” the result of the async call and in the line below it, continue working with the result – the compiler does some dark magic (if you ever used yield return, it’s a very similar type of dark magic) and turns your method into a series of methods + a state machine that will be called in the correct order.

    Read more about it here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello this is may first question and I have found so far the following
Hello all this is my first post here i have been working in an
First off - hello, this is my first Stack Overflow question so I'll try
I have a JSON data like this: { hello: { first:firstvalue, second:secondvalue }, hello2:
Question: Hello All, Sorry that this is kind of a noob question. I just
Hello all,I'm a junior on html,I have a question about css position : first
Usless Background Info Hello, all. This is my first post here, but I often
This is the first time i'm asking a question here at stack overflow so
This has to be a common question that all programmers have from time to
Hello this is my first question of stack overflow, so forgive me if i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.