예제 #1
0
 public DownloadJob(
     JobId id,
     Link link,
     SaveAsFile saveAsFile,
     long createdTicks,
     DownloadTaskFactory downloadTaskFactory)
 {
     Id                   = id;
     Link                 = link;
     SaveAsFile           = saveAsFile;
     CreatedTicks         = createdTicks;
     _downloadTaskFactory = downloadTaskFactory;
 }
예제 #2
0
        internal DownloadJob CreateDownloadJob(
            Link link,
            SaveAsFile saveAsFile)
        {
            var id  = _newGuid();
            var job =
                new DownloadJob(
                    id,
                    link,
                    saveAsFile,
                    _getTicks(),
                    _downloadTaskFactory);

            _jobs[id] = job;
            return(job);
        }