Note that there are some explanatory texts on larger screens.

plurals
  1. POCode after await statement is not reached
    primarykey
    data
    text
    <p>My Code:</p> <pre><code>public async Task LoadRecentlyRatedBooks() { RecentlyRatedBooks.Clear(); try { var books = await App.CurrentApplication .BookRequests .GetBooksByCategory(BookListCategory.News, 10, 0); if (books != null) { foreach (var book in books) { var bookViewModel = AddBook(book); if (bookViewModel != null) { RecentlyRatedBooks.Add(bookViewModel); } } } } catch(Exception ex) { } } public async Task&lt;IEnumerable&lt;Book&gt;&gt; GetBooksByCategory(BookListCategory category, uint limit, uint offset) { var request = CreateBookListURL(category, limit, offset); var response = await client.GetResponseAsyncEx&lt;List&lt;Book&gt;&gt;(request); return response.Data; } </code></pre> <p>I have problem with calling code after <code>await</code> statement. My application reaches the return statement in <code>GetBooksByCategory()</code> method but it never reaches the code after <code>await</code> statement. I tried put breakpoint to <code>catch</code>-block or to line containing <code>if (books != null)</code> but without success. Application never reaches these breakpoints. </p> <p>Im now using Visual Studio 2010 on Windows 7. There is also Visual Studio 2012 for Desktop installed.</p> <p>Im sure that my code is working on Windows 8 with Visual Studio 2012 for WP. I wonder why is it not working on Windows 7 with VS 2010.</p> <p>Link to repository containing my code: <a href="https://bitbucket.org/chovik/smartlib-mu-wp" rel="nofollow">https://bitbucket.org/chovik/smartlib-mu-wp</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload