} // SegmentDownloadRestarted protected virtual void OnSegmentDownloadCompleted(object sender, SegmentDownloadCompletedEventArgs e) { if (SegmentDownloadCompleted == null) { return; } SegmentDownloadCompleted(sender, e); } // OnSegmentDownloadCompleted
} // FireSegmentDownloadRestarted protected virtual void FireSegmentDownloadCompleted(SegmentStatus status) { if (SegmentDownloadCompleted == null) { return; } var e = new SegmentDownloadCompletedEventArgs(status.SegmentData) { PayloadId = Header.PayloadId, SegmentId = Header.SegmentId, SegmentVersion = Header.SegmentVersion, SectionCount = status.SegmentData.LastSectionNumber + 1, SegmentListIndex = status.InfoIndex, SegmentsReceived = this.SegmentsReceived, SegmentsPending = this.SegmentsPending, }; OnSegmentDownloadCompleted(this, e); } // SegmentDownloadCompleted
} // SegmentDownloadRestarted protected virtual void OnSegmentDownloadCompleted(object sender, SegmentDownloadCompletedEventArgs e) { SegmentDownloadCompleted?.Invoke(sender, e); } // OnSegmentDownloadCompleted