Table of Contents

Class AttachmentPassage

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

One passage cut out of an attachment, with the place inside the file it was read from.

public sealed record AttachmentPassage : IEquatable<AttachmentPassage>
Inheritance
AttachmentPassage
Implements
Inherited Members

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.

Constructors

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.

Properties

AttachmentPosition

The zero-based walk position of the attachment, which is what the download route is addressed with.

DeclaredMediaType

What the part declares itself to be, which is the sender's claim rather than a reading of the content.

FileName

The normalized file name, or null where the part carried no usable name.

Kind

Whether the words are the file's own or a model's account of a picture.

Ordinal

The passage's place in that attachment's own text, counted from zero in reading order.

Segment

The 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.

Text

The passage itself, exactly as the chunker cut it.