} // OnSegmentDownloadStarted protected virtual void OnSegmentSectionReceived(object sender, SegmentSectionReceivedEventArgs e) { if (SegmentSectionReceived == null) { return; } SegmentSectionReceived(sender, e); } // OnSegmentSectionReceived
} // OnSegmentDownloadCompleted #endregion #region Auxiliary methods protected SegmentSectionReceivedEventArgs GetSegmentSectionReceivedEventArgs(SegmentStatus status) { var e = new SegmentSectionReceivedEventArgs() { PayloadId = Header.PayloadId, SegmentId = Header.SegmentId, SegmentVersion = Header.SegmentVersion, SectionCount = status.SegmentData.LastSectionNumber + 1, SectionsReceived = status.SegmentData.ReceivedSections, SectionNumber = Header.SectionNumber, SegmentListIndex = status.InfoIndex }; return(e); } // GetSegmentSectionReceivedEventArgs
} // OnSegmentDownloadStarted protected virtual void OnSegmentSectionReceived(object sender, SegmentSectionReceivedEventArgs e) { SegmentSectionReceived?.Invoke(sender, e); } // OnSegmentSectionReceived