Method ComputeForAttachment
- Namespace
- MailFathom.Application.Emails.Chunking
- Assembly
- MailFathom.Application.dll
ComputeForAttachment(EmailChunkingRules, EmailChunkAttachmentSource, string)
Computes the identity of one passage cut out of an attachment.
public static EmailChunkContentHash ComputeForAttachment(EmailChunkingRules rules, EmailChunkAttachmentSource source, string text)
Parameters
rulesEmailChunkingRulesThe boundary rules the passage was cut to.
sourceEmailChunkAttachmentSourceThe attachment the passage is a span of.
textstringThe passage's own text.
Returns
- EmailChunkContentHash
The passage's content hash.
Remarks
The two fields a body passage carries that an attachment passage does not are absent rather than written as defaults: the source form names which reading of a body was cut, and the lossy marker names text inferred from a message's markup. Neither is a fact about a file, and encoding either as a zero would publish an answer to a question that was never asked. What replaces them is what the attachment actually is — its walk position and the media type that decided which parser read it.
Exceptions
- ArgumentNullException
Thrown when any argument is null.