Constructor AttachmentPassage
- Namespace
- MailFathom.Application.Emails.AttachmentText
- Assembly
- MailFathom.Application.dll
AttachmentPassage(int, int, string?, string, AttachmentTextKind, AttachmentTextSegment?, string)
One passage cut out of an attachment, with the place inside the file it was read from.
public AttachmentPassage(int AttachmentPosition, int Ordinal, string? FileName, string DeclaredMediaType, AttachmentTextKind Kind, AttachmentTextSegment? Segment, string Text)
Parameters
AttachmentPositionintThe zero-based walk position of the attachment, which is what the download route is addressed with.
OrdinalintThe passage's place in that attachment's own text, counted from zero in reading order.
FileNamestringThe normalized file name, or null where the part carried no usable name.
DeclaredMediaTypestringWhat the part declares itself to be, which is the sender's claim rather than a reading of the content.
KindAttachmentTextKindWhether the words are the file's own or a model's account of a picture.
SegmentAttachmentTextSegmentThe page, slide, or sheet the passage begins in, or null where the reading recorded no boundaries — an attachment whose text a redaction rewrote to a different length is the case that produces one, because a boundary that no longer indexes the words would send a reader to the wrong page.
TextstringThe passage itself, exactly as the chunker cut it.
Remarks
This is the one kind of passage a caller may receive directly, and a message passage is not. A message chunk exists purely to be embedded — anything that needs a message reads it whole, because a message is small enough that reading it whole is always the right answer. An attachment is not: a two-hundred-page report re-served in full every time a search cites it is neither necessary nor, for a model composing an answer, useful. A few hundred words around the words that matched, with a pointer to where in the file they were, is what an answer quotes and what a person verifies.
The text is mail content, and where Kind is a description it is a machine's account of mail content — untrusted twice over. Whoever presents it or hands it to a model treats it as opaque characters a stranger composed, and it reaches no log, metric, trace, or error message.