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
textstringThe text with every detected region replaced.
findingsIReadOnlyList<SensitiveContentFinding>Every finding the scanners reported.
omittedCharacterCountintHow many characters lay beyond what one scan analyzes.
placementsIReadOnlyList<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
textorfindingsis null.- ArgumentOutOfRangeException
Thrown when
omittedCharacterCountis negative.