示例#1
0
        public static DownloadTask DownloadStringAsync(
            string url,
            object token                  = null,
            Priority priority             = Priority.High,
            DownloadTaskHandler progress  = null,
            DownloadTaskHandler completed = null,
            int retry = 0)
        {
            DownloadTask task = new DownloadTask(url, null, token, retry);

            task.ProgressChangedEvent   += progress;
            task.DownloadCompletedEvent += completed;
            return(DownloadAsync(task, priority));
        }
示例#2
0
 public static DownloadTask DownloadStringAsync(
     string url,
     object token = null,
     Priority priority = Priority.High,
     DownloadTaskHandler progress = null,
     DownloadTaskHandler completed = null,
     int retry = 0)
 {
     DownloadTask task = new DownloadTask(url, null, token, retry);
     task.ProgressChangedEvent += progress;
     task.DownloadCompletedEvent += completed;
     return DownloadAsync(task, priority);
 }