Table of Contents

Method RecordAsync

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

RecordAsync(string, DateOnly?, TaskAnnouncement, StoredEmailId?, CancellationToken)

Records a task the signed-in person has just committed to.

public Task<PersonalTask> RecordAsync(string title, DateOnly? dueOn, TaskAnnouncement announcement, StoredEmailId? sourceMessage, CancellationToken cancellationToken)

Parameters

title string

The line the list is drawn with.

dueOn DateOnly?

The day it is due on, or null where they said nothing about when.

announcement TaskAnnouncement

What announces it and the offset their due day runs in, or Silent to announce nothing.

sourceMessage StoredEmailId?

The message they were looking at, or null where the task cites none.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<PersonalTask>

The task as it was written.

Remarks

What somebody types into their own client is something they owe, so a task written here is asserted and this is not the seam a proposal arrives through: what mail suggested is written by the extraction that read it, under the origin that says nobody has agreed to it yet.

The citation is taken as the caller states it and is not resolved against the mailbox. It is a value the task keeps rather than a reference the row depends on, and following one is the citation route's act under the same grant — so an identity naming nothing resolves to nothing there rather than being refused here, and nothing about whose mail exists is reported by writing a task.

Exceptions

ArgumentNullException

Thrown when announcement is null.

ArgumentException

Thrown when title is blank, when one lead is stated twice, or when leads are stated against no due day.

ArgumentOutOfRangeException

Thrown when title exceeds MaximumTitleLength, or when more than MaximumCount leads are stated.

PrincipalNotAuthorizedException

Thrown when the caller acts for no user, or its grant omits TasksWrite.