Table of Contents

Method FromDescription

Namespace
MailFathom.Application.Emails.AttachmentText
Assembly
MailFathom.Application.dll

FromDescription(int, string, string?, ImageAttachmentDescription)

Records what reading one image attachment produced.

public static DerivedAttachmentText FromDescription(int position, string declaredMediaType, string? fileName, ImageAttachmentDescription description)

Parameters

position int

The attachment's walk position.

declaredMediaType string

The media type the part declared.

fileName string

The normalized file name, or null.

description ImageAttachmentDescription

What the describer answered.

Returns

DerivedAttachmentText

The derivation to store.

Remarks

A transcription is stored as a Document: the words on a scanned invoice are somebody's written words, and are searched the way a PDF's are. A description stays an ImageDescription, and a refusal is recorded under that kind as well, since nothing was read far enough to say the picture held a document.

Either is one place with no pagination to record, so it carries a single segment covering the whole of it. Without one a passage cut from a long answer would resolve to no place at all, and a citation would have to special-case the kind rather than reading the same list every other attachment carries.

Exceptions

ArgumentNullException

Thrown when declaredMediaType or description is null.