Method Create
- Namespace
- MailFathom.Application.Emails.ThreadStates
- Assembly
- MailFathom.Application.dll
Create(ThreadStateAspect, string, IReadOnlyList<StoredEmailId>, string?, DateTimeOffset?)
Records one statement about where a conversation stands.
public static ThreadStateEntry Create(ThreadStateAspect aspect, string text, IReadOnlyList<StoredEmailId> sources, string? owedBy = null, DateTimeOffset? dueAt = null)
Parameters
aspectThreadStateAspectWhich of the four things the statement says.
textstringWhat the statement says.
sourcesIReadOnlyList<StoredEmailId>The messages it rests on, which is never empty.
owedBystringWho owes the commitment, for a commitment that names somebody.
dueAtDateTimeOffset?When the commitment falls due, for a commitment that names a date.
Returns
- ThreadStateEntry
The statement, with the text and the owner shortened to their bounds and the sources to theirs.
Exceptions
- ArgumentNullException
Thrown when
sourcesortextis null.- ArgumentException
Thrown when the text is present but blank, when the sources are empty, or when an aspect other than a commitment names an owner or a date.
- ArgumentOutOfRangeException
Thrown when
aspectis not a defined member.