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
textstringThe text about to be stored, indexed, or handed out.
cancellationTokenCancellationTokenCancels 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
textis null.- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what the text carries.
- OperationCanceledException
Thrown when
cancellationTokenis cancelled.