Table of Contents

Method Create

Namespace
MailFathom.Application.Jobs
Assembly
MailFathom.Application.dll

Create(JobIdempotencyKey, IJobPayload, MailAccountId?)

States an execution to be done as soon as a worker can take it.

public static JobEnqueueRequest Create(JobIdempotencyKey key, IJobPayload payload, MailAccountId? accountId)

Parameters

key JobIdempotencyKey

The identity of the execution, composed by whoever knows the work.

payload IJobPayload

The references the work is described by.

accountId MailAccountId?

The account the work belongs to, or null when it belongs to none.

Returns

JobEnqueueRequest

The request to enqueue.

Exceptions

ArgumentNullException

Thrown when key or payload is null.

ArgumentException

Thrown when the payload names no declared job type.