Table of Contents

Method Create

Namespace
MailFathom.Application.Emails.Search
Assembly
MailFathom.Application.dll

Create(string?)

Validates and normalizes the text a request asked to search for.

public static EmailSearchQueryText Create(string? text)

Parameters

text string

The query text a caller supplied.

Returns

EmailSearchQueryText

The validated query text.

Remarks

Blank text is refused rather than treated as "match everything". A search with no text is a listing, which MailboxTimelineReader already answers in a stable order and with a cursor; answering it here would return an arbitrary relevance-ordered window of the whole mailbox instead, and every result would carry a rank of zero and a snippet of whatever each message happens to begin with.

Exceptions

MailboxQueryFilterInvalidException

Thrown when the text is blank, longer than MaximumLength, or carries a control character.