コード例 #1
0
 /// <summary>
 /// Deletes an issue's attachment.
 /// </summary>
 /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param>
 /// <param name="attachment">Attachment's model. Should contains content url to download.</param>
 /// <exception cref="SimpleJira.Interface.JiraAuthorizationException">Throws exception when user is not authorized.</exception>
 /// <exception cref="SimpleJira.Interface.JiraException">Throws exception in other cases.</exception>
 public static Task DeleteAttachmentAsync(this IJira jira, JiraAttachment attachment)
 {
     return(jira.DeleteAttachmentAsync(attachment, CancellationToken.None));
 }
コード例 #2
0
 /// <summary>
 /// Deletes an issue's attachment.
 /// </summary>
 /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param>
 /// <param name="attachment">Attachment's model. Should contains content url to download.</param>
 /// <exception cref="SimpleJira.Interface.JiraAuthorizationException">Throws exception when user is not authorized.</exception>
 /// <exception cref="SimpleJira.Interface.JiraException">Throws exception in other cases.</exception>
 public static void DeleteAttachment(this IJira jira, JiraAttachment attachment)
 {
     jira.DeleteAttachmentAsync(attachment, CancellationToken.None).GetAwaiter().GetResult();
 }