public void SetStatus(DownloadStatus status, string message = null) { StatusChange(status, message); if (status == DownloadStatus.Processed || status == DownloadStatus.Failed) { DownloadFinishedHandle.Set(); } }
public void SetStatus(DownloadStatus status, string message = null) { StatusChange(status, message); if (status == DownloadStatus.Aborted) { try { _client.CancelAsync(); } catch { } } if (status == DownloadStatus.Processed || status == DownloadStatus.Failed || status == DownloadStatus.Aborted) { DownloadFinishedHandle.Set(); } }