如何在终止后取消(中止)后台传输 [英] How to cancel (abort) a background transfer after termination

查看:92
本文介绍了如何在终止后取消(中止)后台传输的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序在终止后恢复后,我使用GetCurrentDownloadsAsync()函数枚举待处理的下载。


但是,正如我所见,没有取消()或中止( )在DownloadOperation类中。如何取消或中止?

解决方案

您好,


请检查 本文档DownloadOperation类具有暂停和恢复功能。

http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.downloadoperation.aspx


请按照后台传输样本

http:// code .msdn.microsoft.com / windowsapps / Background-Transfer-Sample-d7833f61 /


最好的问候,

Jesse


After app resumes after termination, I am enumerating the pending downloads using GetCurrentDownloadsAsync() function.

However, as I see, there is no Cancel() or Abort() in DownloadOperation class. How can I cancel or abort it?

解决方案

Hi,

Please check  this document DownloadOperation class has Pause and resume function.
http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.downloadoperation.aspx

Please follow the Background Transfer sample
http://code.msdn.microsoft.com/windowsapps/Background-Transfer-Sample-d7833f61/

Best regards,
Jesse


这篇关于如何在终止后取消(中止)后台传输的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆