Table of Contents

Method CancelAsync

Namespace
MailFathom.Application.Mail.Delivery.Scheduling
Assembly
MailFathom.Application.dll

CancelAsync(RecurringSendId, CancellationToken)

Stops a declaration from producing any further occurrence.

public Task<RecurringSendCancellation> CancelAsync(RecurringSendId recurringSendId, CancellationToken cancellationToken)

Parameters

recurringSendId RecurringSendId

The declaration to stop.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<RecurringSendCancellation>

What became of the request, which is an answer rather than a failure in every case.

Remarks

The grant asked for is the one that lets a caller send, for the reason cancelling one message asks for it: whoever may write to this mailbox's correspondents is who may decide that it stops writing to them.

Exceptions

PrincipalNotAuthorizedException

Thrown when the caller does not hold MailSend.

PersistenceConcurrencyConflictException

Thrown when the write lost its race on every allowed attempt.