Class EmailChunkAttachmentSource
- Namespace
- MailFathom.Application.Emails.Chunking
- Assembly
- MailFathom.Application.dll
Names the attachment a passage is a span of, which a passage cut from the message body is not a span of anything but.
public sealed record EmailChunkAttachmentSource : IEquatable<EmailChunkAttachmentSource>
- Inheritance
-
EmailChunkAttachmentSource
- Implements
- Inherited Members
Remarks
This is the one thing ADR 0029 adds to a passage: an offset names a span in a text, and an attachment-derived passage indexes a different text from the body-derived passage beside it, so the row has to say which. The position is the message's own walk order — the same coordinate the download route is addressed with and the same one a citation resolves — because a file name is text a sender chose and is neither unique nor required.
Both members reach EmailChunkContentHash, and that is what keeps the two kinds of passage from colliding: identical words read out of the second attachment of a message and out of its body are not one passage under two names, and neither are identical words read out of a file that declared itself a spreadsheet and one that declared itself a document. The media type is the sender's declaration rather than a reading of the octets, which is the honest thing to record — it is what decided which parser was offered the file.
Properties
- DeclaredMediaType
Gets the media type the part declared, which is what chose the parser its text came from.
- Position
Gets the zero-based place the attachment holds in the order the message's structure is walked.
Methods
- Create(int, string)
Builds the source of a passage cut from one attachment.