Table of Contents

Method ProposeAsync

Namespace
MailFathom.Application.Tasks
Assembly
MailFathom.Application.dll

ProposeAsync(MailAccountId, StoredEmailId, IReadOnlyList<EmailTaskProposal>, CancellationToken)

Writes one message's readings onto the list of each person assigned the mailbox it arrived in.

public Task<int> ProposeAsync(MailAccountId account, StoredEmailId message, IReadOnlyList<EmailTaskProposal> proposals, CancellationToken cancellationToken)

Parameters

account MailAccountId

The mailbox the message arrived in, which is what decides whose lists these reach.

message StoredEmailId

The message the readings came out of, which every task written here cites.

proposals IReadOnlyList<EmailTaskProposal>

What the message asked for, which is empty where it asked for nothing.

cancellationToken CancellationToken

Cancels the writes; tasks already written stay durable.

Returns

Task<int>

How many tasks were written, over every person and every reading.

Remarks

Nothing is read before anything is written, and a task already proposed from this message is not looked for. The pass takes a message out of the selection by deriving from it, so one message produces one derivation and the duplicate this would guard against has no path to occur — and a read per person per message would be a query on the arrival path for a case the pass already rules out.

Exceptions

ArgumentNullException

Thrown when proposals is null.

OperationCanceledException

Thrown when the caller cancels.