Method PerformAsync
- Namespace
- MailFathom.Application.Mail.Mutations
- Assembly
- MailFathom.Application.dll
PerformAsync(MailboxMutationRequest, MailFolderResolution, MailTransportSecurityPolicy, CancellationToken)
Writes the change down and carries it as far as it can get.
public Task<MailboxMutationOutcome> PerformAsync(MailboxMutationRequest request, MailFolderResolution folder, MailTransportSecurityPolicy transportSecurityPolicy, CancellationToken cancellationToken)
Parameters
requestMailboxMutationRequestThe change being asked for.
folderMailFolderResolutionThe alias binding the occurrence belongs to, whose remote folder is selected for writing.
transportSecurityPolicyMailTransportSecurityPolicyThe connection and authentication policy the write session must obey.
cancellationTokenCancellationTokenCancels the durable writes, opening the session, and the mail server commands.
Returns
- Task<MailboxMutationOutcome>
What this call did, and where the record of it can be read.
Remarks
A failure that leaves attempts remaining is raised, because the caller decides whether to ask again and when. A failure that spends the last attempt is recorded as terminal first and then raised, so the next call is answered from the record rather than opening a connection for a change nothing will make.
Exceptions
- ArgumentNullException
Thrown when
request,folder, ortransportSecurityPolicyis null.- ArgumentException
Thrown when
folderdoes not name the binding the request's occurrence belongs to.- MailboxUnavailableException
Thrown when the mail server did not serve the mutation within its configured resilience budget and attempts remain.
- PersistenceConcurrencyConflictException
Thrown when the durable record could not be written because another writer changed it first.