Table of Contents

Method Create

Namespace
MailFathom.Application.SensitiveContent.Redaction
Assembly
MailFathom.Application.dll

Create(string, IReadOnlyList<SensitiveContentFinding>, int, IReadOnlyList<RedactedPlacement>?)

Records a redaction.

public static RedactedText Create(string text, IReadOnlyList<SensitiveContentFinding> findings, int omittedCharacterCount, IReadOnlyList<RedactedPlacement>? placements = null)

Parameters

text string

The text with every detected region replaced.

findings IReadOnlyList<SensitiveContentFinding>

Every finding the scanners reported.

omittedCharacterCount int

How many characters lay beyond what one scan analyzes.

placements IReadOnlyList<RedactedPlacement>

Where each placeholder stands, in order, or nothing where none was applied.

Returns

RedactedText

The result.

Remarks

placements defaults to none, which is the identity mapping and is what a caller composing a result with no findings means. Nothing derives it from findings: those are reported before overlapping regions were merged, so one placeholder need not correspond to one finding, and reconstructing the merge here would be a second copy of the rule the redactor applies.

Exceptions

ArgumentNullException

Thrown when text or findings is null.

ArgumentOutOfRangeException

Thrown when omittedCharacterCount is negative.