Table of Contents

Class StoredMailScopeJobPayload

Namespace
MailFathom.Application.Jobs
Assembly
MailFathom.Application.dll

Points one job at the stored mail of an account, or of one folder of it, and at nothing inside a message.

public sealed record StoredMailScopeJobPayload : IJobPayload, IEquatable<StoredMailScopeJobPayload>
Inheritance
StoredMailScopeJobPayload
Implements
Inherited Members

Remarks

The two components are the deployment's own names for a mailbox and for a folder of it, so the document carries nothing derived from a message and has no property one could be put in. What the work reads about that mail it reads from committed local state.

An absent folder is every folder the account holds mail in rather than a folder named by an empty string, which is the same distinction StoredMailScope draws and the reason the property is nullable rather than defaulted.

The properties are primitives rather than the domain value objects they came from, because this record is the stored document — one jsonb column an operator reads when they ask what a queued job is. Rebuilding the identities is ToAccountId() and ToFolderAlias(), which validate them the way the domain types do.

Properties

AccountId

Gets the account whose stored mail the work covers.

FolderAlias

Gets MailFathom's own name for the one folder to cover, or null for every folder the account holds mail in.

JobType

Gets the job type this payload is the one contract of.

Methods

For(MailAccountId, MailFolderAlias?)

Describes one scope of stored mail as the document a job carries.

ToAccountId()

Rebuilds the account identity this payload names.

ToFolderAlias()

Rebuilds the folder alias this payload names, which is absent for a whole-account scope.