Table of Contents

Method ScheduleAsync

Namespace
MailFathom.Application.Spam
Assembly
MailFathom.Application.dll

ScheduleAsync(StoredEmailId, EmailOccurrenceId, CancellationToken)

Asks for one committed message to be classified.

public Task ScheduleAsync(StoredEmailId emailId, EmailOccurrenceId occurrenceId, CancellationToken cancellationToken)

Parameters

emailId StoredEmailId

The local identity the occurrence was stored as, which the execution is keyed by.

occurrenceId EmailOccurrenceId

The occurrence synchronization has just stored, with its content.

cancellationToken CancellationToken

Cancels the enqueue.

Returns

Task

A task that completes once the queue has answered, or at once where no classification is wanted.

Remarks

Asking twice for one message is asking once. Both identities name the same message — the local row is keyed by the occurrence — so a run that stored it again, whether a folder walked afresh or a run resumed after a crash, is answered with the job that is already there rather than adding a second one.

Exceptions

ArgumentNullException

Thrown when occurrenceId is null.