Method OpenAsync
- Namespace
- MailFathom.Application.EmailContent.Attachments
- Assembly
- MailFathom.Application.dll
OpenAsync(int, CancellationToken)
Opens the attachment at one position of the message this walk parsed.
Task<OpenedEmailAttachmentResult> OpenAsync(int attachmentPosition, CancellationToken cancellationToken)
Parameters
attachmentPositionintThe zero-based position in the walk order.
cancellationTokenCancellationTokenCancels the read of that part.
Returns
- Task<OpenedEmailAttachmentResult>
The opened attachment, or the reason there is none to open.
Remarks
The same result the single-position read answers with, and for the same reason: a part whose octets no longer decode is a damaged local copy the caller records a repair request for, while a position past the end is the walk disagreeing with whatever asked for it.