Method FindLatestAsync
- Namespace
- MailFathom.Application.Rules.Evaluation
- Assembly
- MailFathom.Application.dll
FindLatestAsync(MailAccountId, CancellationToken)
Reads the run one account has outstanding, or the last one it finished.
public Task<MailRuleEvaluationRun?> FindLatestAsync(MailAccountId accountId, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose run is read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<MailRuleEvaluationRun>
The run, or null where the account has never been asked for one.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the use case was reached by anything but a caller granted AdminRead.
- OperationCanceledException
Thrown when the caller cancels.