示例#1
0
        public void Sould_Download_Attachment()
        {
            var url = Helper.Uri + "/attachments/download/" + ATTACHMENT_ID + "/" + ATTACHMENT_FILE_NAME;

            var document = redmineManager.DownloadFile(url);

            Assert.IsNotNull(document, "Downloaded file is null.");
        }
示例#2
0
 /// <summary>
 /// Downloads the file asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="address">The address.</param>
 /// <returns></returns>
 public static Task <byte[]> DownloadFileAsync(this RedmineManager redmineManager, string address)
 {
     return(Task.Factory.StartNew(() => redmineManager.DownloadFile(address), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default));
 }
 /// <summary>
 /// Downloads the file asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="address">The address.</param>
 /// <returns></returns>
 public static Task <byte[]> DownloadFileAsync(this RedmineManager redmineManager, string address)
 {
     return(delegate { return redmineManager.DownloadFile(address); });
 }
示例#4
0
 /// <summary>
 /// Downloads the file asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="address">The address.</param>
 /// <returns></returns>
 public static Task <byte[]> DownloadFileAsync(this RedmineManager redmineManager, string address)
 {
     return(Task.Factory.StartNew(() => redmineManager.DownloadFile(address), TaskCreationOptions.LongRunning));
 }
 /// <summary>
 /// Downloads the file asynchronous.
 /// </summary>
 /// <param name="redmineManager">The redmine manager.</param>
 /// <param name="address">The address.</param>
 /// <returns></returns>
 public static Task <byte[]> DownloadFileAsync(this RedmineManager redmineManager, string address)
 {
     return(Task.Factory.StartNew(() => redmineManager.DownloadFile(address)));
 }