Method ReadContentAsync
- Namespace
- MailFathom.Application.Emails.GetEmailContent
- Assembly
- MailFathom.Application.dll
ReadContentAsync(GetEmailContentRequest, CancellationToken)
Reads every email the request names.
public Task<GetEmailContentResult> ReadContentAsync(GetEmailContentRequest request, CancellationToken cancellationToken)
Parameters
requestGetEmailContentRequestThe emails to read and which representations to produce.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<GetEmailContentResult>
One outcome per named email, in the order they were named.
Remarks
Reading writes nothing about the emails themselves and is safe to repeat. The one write it can perform is the repair request a damaged local copy produces, which is idempotent per email for exactly that reason.
The emails are read one after another rather than concurrently, because the character budget is carried from one to the next: what an email is allowed to return depends on what the emails before it returned, and that is what makes the bound on a whole call exact rather than approximate.
Exceptions
- ArgumentNullException
Thrown when
requestis null.