Method OpenAsync
- Namespace
- MailFathom.Application.Emails.DownloadAttachment
- Assembly
- MailFathom.Application.dll
OpenAsync(AttachmentDownloadTicket, CancellationToken)
Opens the attachment the ticket authorizes.
public Task<IOpenedEmailAttachment?> OpenAsync(AttachmentDownloadTicket ticket, CancellationToken cancellationToken)
Parameters
ticketAttachmentDownloadTicketWhat the redeemed capability authorizes.
cancellationTokenCancellationTokenCancels the read when the reader disconnects.
Returns
- Task<IOpenedEmailAttachment>
The opened attachment, which the caller owns and must dispose, or null when there is nothing to serve.
Remarks
A damaged or missing local copy records a repair request before the refusal, exactly as reading the message's content does. The finding is about the stored copy rather than about who asked for it, so discarding it because the request happened to arrive through a link would leave a defect discovered and unrecorded.
Exceptions
- ArgumentNullException
Thrown when
ticketis null.