Table of Contents

Method Compose

Namespace
MailFathom.Domain.Tasks
Assembly
MailFathom.Domain.dll

Compose(PersonalTaskId, UserId, string, DateOnly?, TaskAnnouncement, PersonalTaskOrigin, StoredEmailId?)

Composes a task nobody has completed yet.

public static PersonalTask Compose(PersonalTaskId id, UserId user, string title, DateOnly? dueOn, TaskAnnouncement announcement, PersonalTaskOrigin origin, StoredEmailId? sourceMessage)

Parameters

id PersonalTaskId

What addresses the task.

user UserId

The person whose list it is on.

title string

The line the list is drawn with.

dueOn DateOnly?

The day it is due on, or null where nobody has said when.

announcement TaskAnnouncement

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

origin PersonalTaskOrigin

Where the task came from.

sourceMessage StoredEmailId?

The message it was read out of, or null where it names none.

Returns

PersonalTask

A task that stands outstanding.

Remarks

The user has to be a named one, because a row written under the unspecified identity would belong to nobody: unreachable by any read and uncollected by any erasure.

Exceptions

ArgumentNullException

Thrown when announcement is null.

ArgumentException

Thrown when title is blank, when user names nobody, when id is the struct default, when one lead is stated twice, or when leads are stated against no due day.

ArgumentOutOfRangeException

Thrown when origin is not a declared origin, when title exceeds MaximumTitleLength, when more than MaximumCount leads are stated, or when the stated offset is not one a UTC offset can be.