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
keyJobIdempotencyKeyThe identity of the execution, composed by whoever knows the work.
payloadIJobPayloadThe references the work is described by.
accountIdMailAccountId?The account the work belongs to, or null when it belongs to none.
Returns
- JobEnqueueRequest
The request to enqueue.
Exceptions
- ArgumentNullException
Thrown when
keyorpayloadis null.- ArgumentException
Thrown when the payload names no declared job type.