Method FindLatestAsync
- Namespace
- MailFathom.Application.Spam.Runs
- Assembly
- MailFathom.Application.dll
FindLatestAsync(MailAccountId, CancellationToken)
Reads the run one account has outstanding, or the last one it finished.
public Task<SpamClassificationRun?> FindLatestAsync(MailAccountId accountId, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose run is read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<SpamClassificationRun>
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.