コード例 #1
0
 private void NotifyAll(ContentDownloadState state, ContentDownloadError error = ContentDownloadError.None)
 {
     foreach (ContentDownloadItem contentDownloadItem in DownloadQueue.ToArray())
     {
         contentDownloadItem.NotifyDownloadStateChange(state, error);
     }
 }
コード例 #2
0
        internal void CancelDownload(ContentDownloadItem contentDownloadItem, bool forceReset = false)
        {
            if (contentDownloadItem.State != ContentDownloadState.Complete || forceReset)
            {
                if (contentDownloadItem.DownloadYieldInstruction != null)
                {
                    contentDownloadItem.DownloadYieldInstruction.Dispose();
                    contentDownloadItem.DownloadYieldInstruction = null;
                }

                DownloadQueue.Remove(contentDownloadItem);
                contentDownloadItem.NotifyDownloadStateChange(ContentDownloadState.Unknown);

                if (this.OnDownloaderDownloadCancel != null)
                {
                    this.OnDownloaderDownloadCancel(contentDownloadItem);
                }
            }
        }
コード例 #3
0
 private void NotifyAndDequeueAll(ContentDownloadState state, ContentDownloadError error = ContentDownloadError.None)
 {
     NotifyAll(state, error);
     DownloadQueue.Clear();
 }