July 2015
Intermediate to advanced
1300 pages
87h 27m
English
The Async/Await pattern has the goal of simplifying the way developers write asynchronous code. You will learn a lot about the underlying infrastructure, but before digging into that, it is important for you to see how your code can be much cleaner and readable. Let’s start by modifying the QueryVideos method to make some important considerations:
Private Async Function QueryVideosAsync() As _ Task(Of IEnumerable(Of Video)) Dim client As New WebClient Dim data = Await client.DownloadStringTaskAsync(New Uri(Video.FeedUrl)) Dim doc = XDocument.Parse(data) Dim query = From video In doc...<item> Select New Video With { .Title = video.<title>.Value, ...