public DownloadTask AddQueue(DownloadRequest request) { var queue = this.Queue; DownloadTask task = null; lock (queue) { task = new DownloadTask(request); queue.Add(task); this.ResetEvent.Set(); } return(task); }
public DownloadRequestEventArgs(DownloadRequest request) { this.Request = request; }
public DownloadTask(DownloadRequest request) { this.Request = request; this.IndexLock = new object(); this.CancelSources = new List <CancellationTokenSource>(); }