Table of Contents

Method Create

Namespace
MailFathom.Application.Emails.Enrichment
Assembly
MailFathom.Application.dll

Create(EmailEnrichmentAspect, string, string, IReadOnlyList<EmailChunkId>, EmailEnrichmentProvenance, DateTimeOffset?)

Records one reading of a message.

public static EmailEnrichmentMark Create(EmailEnrichmentAspect aspect, string text, string reason, IReadOnlyList<EmailChunkId> evidence, EmailEnrichmentProvenance provenance, DateTimeOffset? dueAt = null)

Parameters

aspect EmailEnrichmentAspect

Which of the three readings the mark carries.

text string

What the mark says.

reason string

Why the producer says it.

evidence IReadOnlyList<EmailChunkId>

The passages the mark rests on, which is never empty.

provenance EmailEnrichmentProvenance

What produced the mark.

dueAt DateTimeOffset?

When the commitment falls due, for a commitment that names a date.

Returns

EmailEnrichmentMark

The mark, with the text and the reason shortened to MaximumTextLength and the evidence to its own bound.

Remarks

Empty evidence is refused rather than stored, because a mark nothing backs is the thing this record exists to rule out: it would read on a screen exactly like one a passage supports, and no reader could tell them apart.

Exceptions

ArgumentNullException

Thrown when evidence or provenance is null.

ArgumentException

Thrown when the text or the reason is blank, when the evidence is empty, or when an aspect other than a commitment carries a date.

ArgumentOutOfRangeException

Thrown when aspect is not a defined member.