Method IsPlacementOf
- Namespace
- MailFathom.Domain.Mutations
- Assembly
- MailFathom.Domain.dll
IsPlacementOf(RemoteFolderPath, ImapUidValidity, ImapUid)
Reports whether a newly discovered occurrence is the one this mutation's placement created.
public bool IsPlacementOf(RemoteFolderPath discoveredFolderPath, ImapUidValidity discoveredUidValidity, ImapUid discoveredUid)
Parameters
discoveredFolderPathRemoteFolderPathThe remote path of the folder the occurrence was discovered in.
discoveredUidValidityImapUidValidityThe UIDVALIDITY that folder reports now.
discoveredUidImapUidThe UID the discovered occurrence carries.
Returns
Remarks
The join is the server's own COPYUID answer and nothing else. A record that carries no reported placement
matches nothing here, because the only way to find the message without one is to search the destination folder
for something that looks like it — which is a guess about identity rather than a fact, and is exactly what
ADR 0007
refuses. A relocation whose placement was never reported leaves the record awaiting its observation, which is
visible rather than guessed at.
The UIDVALIDITY is compared as well as the UID, so a destination folder recreated between the placement and the discovery matches nothing: the recorded UID names a message in a UID space the folder no longer has.
The stage has to be Completed. Anything earlier means the sequence still owes a command — a fallback relocation stopped after its copy still has the email in both folders — and carrying the local row into the destination then would leave the source occurrence with nothing local pointing at it while convergence still has to remove it.
A copy is placed by AccountsForPlacementAt(RemoteFolderPath, ImapUidValidity, ImapUid) and never by this, because a copy leaves the email where it was: carrying its row across would move an email that never moved.