Question

WP8, VS 2013 Live SDK (nuget) v5.5

private async void DownLoadImageFromSkyDrive(string imgUrl, Int32 number)
{
    LiveConnectClient client = new LiveConnectClient(_currentSession);
    var image = await client.DownloadAsync(imgUrl + "/content");
    BitmapImage bitmap = new BitmapImage();
    bitmap.SetSource(image.Stream);
}

After the execution of

var image = await client.DownloadAsync(imgUrl + "/content");

The callstack is in the parent function. There's no exception, but

BitmapImage bitmap = new BitmapImage();

is not executed. The code has worked....

Was it helpful?

Solution

Or not yet executed... You function is an async method with no return value. It doesn't block the caller. Also I believe async void won't pass the exception to the caller. Put the try catch block in DownLoadImageFromSkyDrive to see what's going on.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top