Table of Contents

Struct MailAccountSelector

Namespace
MailFathom.Domain.Accounts
Assembly
MailFathom.Domain.dll

Holds the text a request uses to name an account, before anything has decided which account that is.

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

Remarks

An account can be named two ways — by the MailAccountId an operator configured or by the MailAccountDisplayName it is published under — and a caller is not required to know which of the two it is holding. The distinction is settled where the served accounts are known, so what travels from a protocol boundary into a use case is this: text that has been proven safe to carry and nothing more.

It is deliberately not a MailAccountId. Reading caller text as an identifier before it has been matched would put a value nobody configured into a type whose whole meaning is that MailFathom issued it, and the refusal for text that names no account would then be indistinguishable from a lookup of a real identity.

Fields

MaximumLength

The greatest length text naming an account may carry.

Properties

Value

Gets the text the request named an account with, trimmed.

Methods

Create(string)

Creates a selector from the text a request carried.

For(MailAccountId)

Creates the selector that names one account by its identifier.

ToString()

Returns the fully qualified type name of this instance.