Method ReadDepictedMatchesAsync
- Namespace
- MailFathom.Application.Emails.Search.Attachments
- Assembly
- MailFathom.Application.dll
ReadDepictedMatchesAsync(MailboxEmailSelection, EmailSearchSnippetBounds, IReadOnlyList<StoredEmailId>, CancellationToken)
Reads the descriptions of the pictures attached to messages a description alone put in a result.
Task<IReadOnlyList<StoredEmailAttachmentMatches>> ReadDepictedMatchesAsync(MailboxEmailSelection selection, EmailSearchSnippetBounds snippetBounds, IReadOnlyList<StoredEmailId> depictedEmailIds, CancellationToken cancellationToken)
Parameters
selectionMailboxEmailSelectionThe same filters the window was ranked under.
snippetBoundsEmailSearchSnippetBoundsHow many passages one message may show.
depictedEmailIdsIReadOnlyList<StoredEmailId>The messages a description alone placed, in any order.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<IReadOnlyList<StoredEmailAttachmentMatches>>
One entry per message whose pictures were described, each carrying at most SnippetsPerEmail passages.
Remarks
The description is served whole rather than cut around anything, because it is not a body being sampled: it is the entire derived text and the only readable account of why the picture matched. It is bounded where it was composed, by the ceiling a description is written under, rather than here.
Exceptions
- ArgumentNullException
Thrown when any reference argument is null.