Table of Contents

Class MailboxMutationRecord

Namespace
MailFathom.Domain.Mutations
Assembly
MailFathom.Domain.dll

Reports what one durable mutation record holds: the change that was asked for and how far it has got.

public sealed record MailboxMutationRecord : IEquatable<MailboxMutationRecord>
Inheritance
MailboxMutationRecord
Implements
Inherited Members

Remarks

The record is written before the first IMAP command and advanced as the sequence proceeds, which is what makes a non-atomic sequence idempotent: a retry reads it and continues from the stage it names rather than starting over. It is also what lets a change MailFathom made be told apart from the same change made by hand, which is a separate reader of the same record rather than a second mechanism.

It is derived personal data. A mutation history says where a person's mail has been and what was done to it, so it inherits the retention and deletion obligations of the email it describes and is removed with it.

Properties

AttemptCount

Gets how many times this mutation has been attempted, counted before each attempt rather than after it.

ExpectsPlacementObservation

Gets whether this mutation puts the email somewhere synchronization will later discover it.

ExpectsSourceRemovalObservation

Gets whether this mutation takes the source occurrence out of the folder it was in.

HasUnknownOutcome

Gets whether the one command that may never be issued twice went out and its answer never came back.

Id

Gets what everything after the first write refers to this record by.

IsReconciled

Gets whether synchronization has accounted for every occurrence this mutation moved.

IsTerminal

Gets whether the record has reached a stage nothing moves it out of.

IsUnknownPlacementSettledBySourceRemoval

Reports whether an unacknowledged placement has since been settled by the source occurrence leaving its folder.

LastFailure

Gets the failure the last attempt ended in, or null while no attempt has failed.

Lifecycle

Gets where in its lifecycle the mutation stands, in the reading somebody watching a deployment asks for.

Placement

Gets where the destination folder put the email, as far as the server has said.

PlacementObservedAt

Gets when synchronization recognized the occurrence this mutation created, or null while it has not.

RecordedAt

Gets when the intent was first written down.

Request

Gets the change that was asked for, restored exactly as it was written down.

RequiresSourceRemoval

Gets whether the placement left a source occurrence that still has to be removed separately.

SourceRemovalObservedAt

Gets when synchronization saw the source occurrence leave its folder, or null while it has not.

Stage

Gets how far along its protocol sequence the mutation has durably reached.

StageChangedAt

Gets when the record last moved, which is what says how long a stuck mutation has been stuck.

Methods

AccountsForPlacementAt(RemoteFolderPath, ImapUidValidity, ImapUid)

Reports whether a newly discovered occurrence is one this mutation put there.

AccountsForRemovalOf(EmailOccurrenceId)

Reports whether an occurrence that has left its folder left it because of this mutation.

AccountsForSeenStateOf(EmailOccurrenceId, bool, DateTimeOffset)

Reports whether the remote \Seen flag a folder just reported stands where this mutation set it.

IsPlacementOf(RemoteFolderPath, ImapUidValidity, ImapUid)

Reports whether a newly discovered occurrence is the one this mutation's placement created.