示例#1
0
        } // SegmentDownloadRestarted

        protected virtual void OnSegmentDownloadCompleted(object sender, SegmentDownloadCompletedEventArgs e)
        {
            if (SegmentDownloadCompleted == null)
            {
                return;
            }

            SegmentDownloadCompleted(sender, e);
        } // OnSegmentDownloadCompleted
示例#2
0
        } // 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
示例#3
0
        } // SegmentDownloadRestarted

        protected virtual void OnSegmentDownloadCompleted(object sender, SegmentDownloadCompletedEventArgs e)
        {
            SegmentDownloadCompleted?.Invoke(sender, e);
        } // OnSegmentDownloadCompleted