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
aspectEmailEnrichmentAspectWhich of the three readings the mark carries.
textstringWhat the mark says.
reasonstringWhy the producer says it.
evidenceIReadOnlyList<EmailChunkId>The passages the mark rests on, which is never empty.
provenanceEmailEnrichmentProvenanceWhat produced the mark.
dueAtDateTimeOffset?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
evidenceorprovenanceis 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
aspectis not a defined member.