private void InitCompletedEvent() { DownloadFileCompletedEx += new AsyncCompletedEventHandlerEx((sender, e) => { try { if (SpeedTimer != null) { SpeedTimer.Dispose(); SpeedTimer = null; } var eventArgs = new MutiDownloadCompletedEventArgs(_version, e.Error, e.Cancelled, e.UserState); _manager.OnMutiAsyncCompleted(this, eventArgs); Dispose(); } catch (Exception exception) { _manager.FailedVersions.Add(new ValueTuple <object, string> { }); _manager.OnMutiDownloadError(this, new MutiDownloadErrorEventArgs(exception, _version)); } finally { IsCompleted = true; } }); }
private void OnMutiDownloadCompleted(object sender, MutiDownloadCompletedEventArgs e) { //Debug.WriteLine($"{ e.Version.Name } download completed."); }