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
occurrenceEmailOccurrenceIdThe occurrence whose keywords changed.
previouslyObservedKeywordsRemoteEmailKeywordsThe keywords the last reading before this mutation found.
observedKeywordsRemoteEmailKeywordsThe keywords the server has now reported.
previouslyObservedAtDateTimeOffsetWhen synchronization last read this occurrence's flags before the reading being judged.
Returns
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.