DRAG DROP
You are developing a Windows Store app that uploads large files to the Internet by using background
tasks.
uploadTask is an instance of the IBackgroundTask interface that provides access to a background
task instance. UploadFilesAsync() is the asynchronous method that performs the upload.
You need to ensure that the app performs the upload operation asynchronously in a background
task.
Which three actions should you perform in sequence? (To answer, move the appropriate actions
from the list of actions to the answer area and arrange them in the correct order.)
Answer: See the explanation
Explanation:
Note:
* Example:
public sealed class TestClass:IBackgroundTask
{
async void IBackgroundTask.Run(IBackgroundTaskInstance taskInstance)
{
BackgroundTaskDeferral deferral = taskInstance.GetDeferral();
await SomeOperationAsync();
await SomeOtherOperationAsync();
deferral.Complete();
}
}
http://msdn.microsoft.com/enus/library/windows/apps/windows.applicationmodel.background.backgroundtaskdeferral.aspx