コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceManager"/> class.
 /// </summary>
 /// <param name="rmtSession">Remote session</param>
 public ResourceManager(RemoteSession rmtSession)
 {
     this.remoteSession = rmtSession;
     this.highPriorityDownloadManager = new ResourceDownloadManager(this.remoteSession);
     this.lowPriorityDownloadManager  = new ResourceDownloadManager(this.remoteSession);
     this.platformService             = SimpleIoc.Default.GetInstance <IPlatformService>();
 }
コード例 #2
0
        private ResourceDownload AttemptToQueueDownloadForResourceAtUrl(Uri url, ResourceDownloadManager downloadManager, string localBasePath, string localFileName, NetworkCredential credentials, DateTime?modificationDate, bool shouldAutoResume)
        {
            ResourceDownload existingDownload = this.HasRunningDownloadForResourceAtUrl(url);

            if (existingDownload != null)
            {
                return(existingDownload);
            }

            ResourceDownload download = this.DownloadForResourceAtUrlLocalBasePathLocalFileNameCredentialsModificationDate(url, localBasePath, localFileName, credentials, modificationDate);

            download.ShouldAutoResume = shouldAutoResume;
            downloadManager.AddResourceDownload(download);
            return(download);
        }
コード例 #3
0
 private ResourceDownload AttemptToQueueDownloadForResourceAtUrl(Uri url, ResourceDownloadManager downloadManager, string localBasePath, string localFileName, NetworkCredential credentials, DateTime?modificationDate)
 {
     return(this.AttemptToQueueDownloadForResourceAtUrl(url, downloadManager, localBasePath, localFileName, credentials, modificationDate, true));
 }