Table of Contents

Class MailBodyCleaningSegments

Namespace
MailFathom.Application.EmailContent.Cleaning
Assembly
MailFathom.Application.dll

Decides whether a set of proposed ranges describes one document, and which blocks it keeps.

public static class MailBodyCleaningSegments
Inheritance
MailBodyCleaningSegments
Inherited Members

Remarks

It accepts nothing it cannot check and repairs nothing. Every other reading of a producer's answer in this system drops what it cannot back and keeps the rest, because a statement is independent of the statements beside it. A cleaning is not: the ranges are a partition of the document, so a missing range is a block whose fate nobody stated and an overlapping pair is two contradictory statements about one block. Repairing either would mean this build deciding what to show a reader and reporting it as a model's decision.

So the bar is that the ranges are ascending, disjoint, and cover every index exactly once. A set that is not is refused whole, and what the caller does about that is ask again once and then serve the ordinary reduced document. The two shapes this catches most often are a producer that renumbered the document as it went and one that answered about the blocks it found interesting, and neither is distinguishable from a correct answer by reading one range.

Methods

Read(IReadOnlyList<MailBodyCleaningSegment>, int)

Reads a proposal as the blocks it keeps, or refuses it.