Table of Contents

Method SearchPageAsync

Namespace
MailFathom.Application.Emails.BrowseSearch
Assembly
MailFathom.Application.dll

SearchPageAsync(BrowseSearchRequest, CancellationToken)

Reads one page of the ranked results.

public Task<BrowsedSearchPage> SearchPageAsync(BrowseSearchRequest request, CancellationToken cancellationToken)

Parameters

request BrowseSearchRequest

What the screen asked for.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<BrowsedSearchPage>

The page, how it was ranked, and the cursor that continues it where the list goes on.

Remarks

Nothing here writes, and the operation is therefore safe to repeat. The grant is asked for before the request is validated, so a caller that may not read learns nothing about which filters this deployment accepts.

Exceptions

ArgumentNullException

Thrown when request is null.

MailboxQueryFilterInvalidException

Thrown when the query text is blank or unusable, or a structured filter carries a value or a length the query does not accept.

MailAccountNotAccessibleException

Thrown when the request names an account its user does not own.

EmailSearchResultLimitOutOfRangeException

Thrown when the request names a page size outside the accepted range.

MailboxQueryCursorMalformedException

Thrown when the request carries a cursor this system did not issue.

MailboxQueryCursorFilterMismatchException

Thrown when the cursor was issued for a different search than the request describes.

SensitiveContentScannerUnavailableException

Thrown when a switched-on scanner could not establish what the page carries, which refuses the page rather than serving it unscanned.

PrincipalNotAuthorizedException

Thrown when the use case was reached by anything but a caller granted MailRead.