Method RunAsync
- Namespace
- MailFathom.Application.Rules.Evaluation
- Assembly
- MailFathom.Application.dll
RunAsync(MailAccountId, CancellationToken)
Takes one bounded pass over the account's arrivals, and over its requested run where it has one.
public Task<MailRuleEvaluationReport> RunAsync(MailAccountId accountId, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose mail is evaluated.
cancellationTokenCancellationTokenCancels the pass between emails and between batches; committed batches stay durable.
Returns
- Task<MailRuleEvaluationReport>
What each walk did, under the revision the pass read when it began.
Remarks
The rule set is read once here and held for both walks, which is the whole of the reload contract for a pass: an edit reaches the next pass rather than this one, so what a rule means cannot change halfway through a mailbox.
Exceptions
- PersistenceConcurrencyConflictException
Thrown when a competing writer wins a race the bounded retries could not resolve. Batches already committed stay durable and the next account run resumes from them.
- OperationCanceledException
Thrown when the caller cancels. Committed batches stay durable.