Class AttachmentExtensions
This holds all the attachment related extension methods
Inheritance
Inherited Members
Namespace:Dapplo.Jira
Assembly:Dapplo.Jira.dll
Syntax
public static class AttachmentExtensions
Methods
| Improve this Doc View SourceAttachAsync<TContent>(IAttachmentDomain, String, TContent, String, String, CancellationToken)
Attach content to the specified issue See: https://docs.atlassian.com/jira/REST/latest/#d2e3035
Declaration
public static Task<Attachment> AttachAsync<TContent>(this IAttachmentDomain jiraClient, string issueKey, TContent content, string filename, string contentType = null, CancellationToken cancellationToken = null)where TContent : class
Parameters
Type | Name | Description |
---|---|---|
IAttachmentDomain | jiraClient | IAttachmentDomain to bind the extension method to |
System.String | issueKey | the key of the issue to attach to |
TContent | content | the content can be anything what Dapplo.HttpExtensions supports |
System.String | filename | Filename for the attachment |
System.String | contentType | content-type for the attachment |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Attachment> | Attachment |
Type Parameters
Name | Description |
---|---|
TContent |
DeleteAsync(IAttachmentDomain, Attachment, CancellationToken)
Delete the specified attachment
Declaration
public static Task DeleteAsync(this IAttachmentDomain jiraClient, Attachment attachment, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentDomain | jiraClient | IAttachmentDomain to bind the extension method to |
Attachment | attachment | The Attachment to delete |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
DeleteAsync(IAttachmentDomain, Int64, CancellationToken)
Delete the specified attachment
Declaration
public static Task DeleteAsync(this IAttachmentDomain jiraClient, long attachmentId, CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
IAttachmentDomain | jiraClient | IAttachmentDomain to bind the extension method to |
System.Int64 | attachmentId | Id from the attachment |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
GetContentAsAsync<TResponse>(IAttachmentDomain, Attachment, CancellationToken)
Get the content for the specified attachment
Declaration
public static Task<TResponse> GetContentAsAsync<TResponse>(this IAttachmentDomain jiraClient, Attachment attachment, CancellationToken cancellationToken = null)where TResponse : class
Parameters
Type | Name | Description |
---|---|---|
IAttachmentDomain | jiraClient | IAttachmentDomain to bind the extension method to |
Attachment | attachment | the attachment |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResponse> | TResponse |
Type Parameters
Name | Description |
---|---|
TResponse | the type which is returned, can be decided by the client and should be supported by Dapplo.HttpExtensions or your own IHttpContentConverter |
GetThumbnailAsAsync<TResponse>(IAttachmentDomain, Attachment, CancellationToken)
Get the thumbnail for the specified attachment
Declaration
public static Task<TResponse> GetThumbnailAsAsync<TResponse>(this IAttachmentDomain jiraClient, Attachment attachment, CancellationToken cancellationToken = null)where TResponse : class
Parameters
Type | Name | Description |
---|---|---|
IAttachmentDomain | jiraClient | IAttachmentDomain to bind the extension method to |
Attachment | attachment | the attachment |
System.Threading.CancellationToken | cancellationToken | CancellationToken |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResponse> | TResponse |
Type Parameters
Name | Description |
---|---|
TResponse | the type which is returned, can be decided by the client and should be supported by Dapplo.HttpExtensions or your own IHttpContentConverter |