Table of Contents

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

aspect ThreadStateAspect

Which of the four things the statement says.

text string

What the statement says.

sources IReadOnlyList<StoredEmailId>

The messages it rests on, which is never empty.

owedBy string

Who owes the commitment, for a commitment that names somebody.

dueAt DateTimeOffset?

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 sources or text is 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 aspect is not a defined member.