public override void Uninitialize() { if (_fileDownload != null) { _fileDownload.Abort(null); _fileDownload = null; } }
static void Main(string[] args) { NetworkCredential credential = new NetworkCredential("username", "password"); WebdavSession session = new WebdavSession(credential); Resource resource = new Resource(session); resource.DownloadProgress += new DownloadProgressEventHandler(DownloadProgress); try { FileDownload fileDownload = resource.DownloadFile("http://myserver/dav/file1.txt", "c:\\temp\\file1.txt"); //Press ENTER to abort download Console.Read(); fileDownload.Abort(); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.Read(); } //Press ENTER to exit. Console.Read(); }
public override void Abort() { base.Abort(); if (_fileDownload.Downloading) { _fileDownload.Abort(null); } }
/// <summary> /// /// </summary> public void AbortUpdate() { StopAllCoroutines(); if (verifier_ != null) { verifier_.Abort(); verifier_ = null; } if (file_download_ != null) { file_download_.Abort(); file_download_ = null; } if (ab_download_ != null) { ab_download_.Abort(); ab_download_ = null; } SaveDownloadCacheData(); UpdateState(emState.Abort); Done(); }
/// <summary> /// /// </summary> public void AbortUpdate() { StopAllCoroutines(); if (_verifier != null) { _verifier.Abort(); _verifier = null; } if (_file_download != null) { _file_download.Abort(); _file_download = null; } if (_ab_download != null) { _ab_download.Abort(); _ab_download = null; } SaveDownloadCacheData(); UpdateState(EmState.Abort); Done(); }