Table of Contents

Method AccountsForKeywordsOf

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

AccountsForKeywordsOf(EmailOccurrenceId, RemoteEmailKeywords, RemoteEmailKeywords, DateTimeOffset)

Reports whether the keywords a folder just reported are exactly what this mutation would have left.

public bool AccountsForKeywordsOf(EmailOccurrenceId occurrence, RemoteEmailKeywords previouslyObservedKeywords, RemoteEmailKeywords observedKeywords, DateTimeOffset previouslyObservedAt)

Parameters

occurrence EmailOccurrenceId

The occurrence whose keywords changed.

previouslyObservedKeywords RemoteEmailKeywords

The keywords the last reading before this mutation found.

observedKeywords RemoteEmailKeywords

The keywords the server has now reported.

previouslyObservedAt DateTimeOffset

When synchronization last read this occurrence's flags before the reading being judged.

Returns

bool

true when this mutation is what left the keywords standing as they do.

Remarks

The set this mutation would have produced is computed from the earlier reading and compared whole, which is what makes the answer exact in both directions. Asking only whether the named keywords are carried, or are not, would be satisfied by a reading the mutation cannot have produced: a removal of $Todo would account for the owner attaching $Invoice to a message that never carried $Todo, and their label would be withheld from evaluation as though MailFathom had caused it. A set the mutation cannot explain is somebody else's, which is the direction this has to fail in.

The comparison is folded, because RFC 9051 compares keywords case-insensitively and the server may report a spelling other than the one written. Every other condition is the one AccountsForSeenStateOf(EmailOccurrenceId, bool, DateTimeOffset) applies, for the same reasons.

Exceptions

ArgumentNullException

Thrown when either keyword set is null.