Table of Contents

Method RedactAsync

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

RedactAsync(string, CancellationToken)

Scans a text and returns it with every detected region replaced by a placeholder.

public Task<RedactedText> RedactAsync(string text, CancellationToken cancellationToken)

Parameters

text string

The text about to be stored, indexed, or handed out.

cancellationToken CancellationToken

Cancels the redaction.

Returns

Task<RedactedText>

The redacted text, the findings behind it, and how much was dropped at the analyzed ceiling.

Exceptions

ArgumentNullException

Thrown when text is null.

SensitiveContentScannerUnavailableException

Thrown when a switched-on scanner could not establish what the text carries.

OperationCanceledException

Thrown when cancellationToken is cancelled.