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
idPersonalTaskIdWhat addresses the task.
userUserIdThe person whose list it is on.
titlestringThe line the list is drawn with.
dueOnDateOnly?The day it is due on, or null where nobody has said when.
announcementTaskAnnouncementWhat announces it and the offset its due day runs in, or Silent to announce nothing.
originPersonalTaskOriginWhere the task came from.
sourceMessageStoredEmailId?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
announcementis null.- ArgumentException
Thrown when
titleis blank, whenusernames nobody, whenidis the struct default, when one lead is stated twice, or when leads are stated against no due day.- ArgumentOutOfRangeException
Thrown when
originis not a declared origin, whentitleexceeds MaximumTitleLength, when more than MaximumCount leads are stated, or when the stated offset is not one a UTC offset can be.