Table of Contents

Struct ContactSearch

Namespace
MailFathom.Domain.Contacts
Assembly
MailFathom.Domain.dll

The text a caller is looking somebody up by, in the form the book compares its own values in.

public readonly record struct ContactSearch : IEquatable<ContactSearch>
Implements
Inherited Members

Remarks

One value matched against two things — a name and an address — so it is derived here rather than per reader. The comparison form is the upper-cased text, which is exactly what SortKey and an address's normalized form already are, so a search means the same thing in memory, in a query, and in a database whose collation MailFathom does not control.

It is bounded and refuses the characters a name refuses, for the reason those values do: the text reaches a database predicate, and a caller decides how long it is and what it carries. Nothing here is a pattern — every character matches itself, wildcards included — so a caller cannot widen a search into a scan of the whole book by writing one.

The text is somebody's name or address and is therefore personal data. It is never logged and never written into a failure message; what a refusal names is the rule the text broke.

Fields

MaximumLength

The greatest length a search text may carry.

Properties

ComparisonForm

Gets the form a name's sort key and an address's normalized form are matched against.

Text

Gets the text as the caller wrote it, trimmed.

Methods

Create(string)

Creates a search from text a caller supplied.

ToString()

Returns the fully qualified type name of this instance.