Method AccountsForSeenStateOf
- Namespace
- MailFathom.Domain.Mutations
- Assembly
- MailFathom.Domain.dll
AccountsForSeenStateOf(EmailOccurrenceId, bool, DateTimeOffset)
Reports whether the remote \Seen flag a folder just reported stands where this mutation set it.
public bool AccountsForSeenStateOf(EmailOccurrenceId occurrence, bool observedSeenState, DateTimeOffset previouslyObservedAt)
Parameters
occurrenceEmailOccurrenceIdThe occurrence whose flag changed.
observedSeenStateboolThe
\Seenvalue the server has now reported.previouslyObservedAtDateTimeOffsetWhen synchronization last read this occurrence's flags before the reading being judged.
Returns
Remarks
The direction is compared as well as the occurrence, so a record that asked for the flag to be set accounts for the flag becoming set and never for it becoming clear. A rule that marks mail read is therefore not re-triggered by its own store, while the owner clearing that flag afterwards reaches evaluation as the change it is.
A record still at Recorded matches nothing, because no STORE has
reached the server for it and the flag standing where it would have put it is somebody else's doing.
previouslyObservedAt is what scopes the answer to the one change this record describes, and
it is the occurrence's own observation rather than a mark on this row. A \Seen store reaches
synchronization only as a value the flag now stands at, so the reading that first sees the mailbox after the
store is the whole of what this record can account for — every reading after that is a mailbox somebody else has
had the chance to change. Anchoring on the row instead would answer only for the readings that happened to
differ: an owner who reverted the flag before the first reading would leave the record unspent and have their
own later change silenced by it.