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
positionintThe attachment's walk position.
declaredMediaTypestringThe media type the part declared.
fileNamestringThe normalized file name, or null.
descriptionImageAttachmentDescriptionWhat 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
declaredMediaTypeordescriptionis null.