Table of Contents

Constructor AttachmentTextSegment

Namespace
MailFathom.Application.Emails.Extraction.Attachments
Assembly
MailFathom.Application.dll

AttachmentTextSegment(AttachmentTextSegmentKind, int, string?, int)

Where one page, slide, or sheet of a document begins in the text the whole document yielded.

public AttachmentTextSegment(AttachmentTextSegmentKind Kind, int Number, string? Label, int StartOffset)

Parameters

Kind AttachmentTextSegmentKind

What the segment is, in the word its own format uses.

Number int

The segment's one-based place among the segments of its own kind, in reading order.

Label string

The name the format records for it, which is null from every reader today.

StartOffset int

Where the segment's text begins in the document's extracted text.

Remarks

The reason the extraction records this at all is that a passage cut out of a document has to say where in the document it came from, and the offsets a chunk carries index the extracted text rather than the file. The segment list is what turns the second into the first: the last segment beginning at or before a passage's start offset is the place that passage was read from, which is what a citation opens.

Recording the boundaries at extraction rather than re-deriving them later is what keeps re-cutting a mailbox a local cost. A boundary rule tuned upwards re-reads the stored segments and re-cuts against them; re-deriving would mean parsing every attachment again, which is the one cost ADR 0029 separated from the embedding budget precisely because it is the expensive one.

A segment carries no characters. Label is the one member that would be read out of the document, and it is a sheet name a sender chose — so it is mail content and would be treated as such wherever it is stored or shown. No reader records one yet: every reading writes null, and resolving a workbook's sheet name is #1682. The member is serialized into the stored boundaries regardless, so a reading written before that lands stays readable after it.