Method Create
- Namespace
- MailFathom.Application.Emails.BrowseSearch
- Assembly
- MailFathom.Application.dll
Create(MailboxScope, string?, string?, string?, DateTimeOffset?, DateTimeOffset?, bool?, bool?, bool?)
Validates and normalizes what a search asked for.
public static RankedSearchList Create(MailboxScope scope, string? queryText, string? senderAddress, string? recipientAddress, DateTimeOffset? receivedOnOrAfter, DateTimeOffset? receivedBefore, bool? isRemotelySeen, bool? isRemotelyFlagged, bool? hasAttachments)
Parameters
scopeMailboxScopeThe accounts and folders to restrict the search to.
queryTextstringThe free text to rank the eligible mail against.
senderAddressstringThe address the sender must carry, in any case, or null for any sender.
recipientAddressstringThe address a
ToorCcrecipient must carry, or null for any recipient.receivedOnOrAfterDateTimeOffset?The inclusive start of the received range, or null for no start.
receivedBeforeDateTimeOffset?The exclusive end of the received range, or null for no end.
isRemotelySeenbool?The remote
\Seenstate to require, or null for either.isRemotelyFlaggedbool?The remote
\Flaggedstate to require, or null for either.hasAttachmentsbool?Whether attachments are required, or null for either.
Returns
- RankedSearchList
The validated list.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.- MailboxQueryFilterInvalidException
Thrown when the query text is blank or unusable, an address is unusable or over-long, or the received range can select nothing.