Interface IOpenedEmailAttachmentWalk
- Namespace
- MailFathom.Application.EmailContent.Attachments
- Assembly
- MailFathom.Application.dll
One stored message parsed once, holding every attachment position open for as long as the walk lasts.
public interface IOpenedEmailAttachmentWalk : IAsyncDisposable
- Inherited Members
Remarks
The download route opens one position per request and pays for one parse to do it. A pass that reads every attachment of a message cannot pay that per position: parsing raw MIME is the most expensive local work in an account run, and repeating it once per attachment would multiply the run's cost by the attachment count for no answer that changes. This is the shape that pays for it once.
The walk owns the parse and every attachment taken from it, which is what makes the parse shared rather than copied. An attachment it hands back is a view over that parse, so disposing one releases nothing and the walk itself is what a caller disposes — and never before the last attachment it opened has been read.
Properties
- Count
Gets how many attachments the message's structure was walked into.
Methods
- OpenAsync(int, CancellationToken)
Opens the attachment at one position of the message this walk parsed.