예제 #1
0
        } // OnSegmentDownloadStarted

        protected virtual void OnSegmentSectionReceived(object sender, SegmentSectionReceivedEventArgs e)
        {
            if (SegmentSectionReceived == null)
            {
                return;
            }

            SegmentSectionReceived(sender, e);
        } // OnSegmentSectionReceived
예제 #2
0
        } // 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
예제 #3
0
        } // OnSegmentDownloadStarted

        protected virtual void OnSegmentSectionReceived(object sender, SegmentSectionReceivedEventArgs e)
        {
            SegmentSectionReceived?.Invoke(sender, e);
        } // OnSegmentSectionReceived