Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Async IV: Progress Reporting

AddThis Social Bookmark Button
In the previous post, I already told you that progress reporting for asynchronous calls can be done by using the IProgress interface. This interface has a Report method with which you can report progress. You probably already saw me using the IProgress interface in the previous post, but now let's explain what actually happens.


protected async override void OnNavigatedTo(NavigationEventArgs e)
{
cts = new CancellationTokenSource();

try
{
await _restCaller.PublishHikeRequest(cts.Token);

var driverIds = await _restCaller.GetDrivers(cts.Token);

if (driverIds != null)
await ShowDriversOnMap(driverIds, cts.Token,
new Progress(p => statusText.Text = string.Format("{0} of {1}", p, driverIds.Count)));

var hikerIds = await _restCaller.GetHikers(cts.Token);

if (hikerIds != null)
...(Read whole news on source site)

Home : Blog List : ProQ. Gitte Vermeiren : Async IV: Progress Reporting