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."); }
/// <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); }); }
/// <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))); }