Table of Contents

Method ScanAsync

Namespace
MailFathom.Application.SensitiveContent.Detection
Assembly
MailFathom.Application.dll

ScanAsync(string, CancellationToken)

Scans text and reports every region of it the configured categories cover.

Task<IReadOnlyList<SensitiveContentFinding>> ScanAsync(string text, CancellationToken cancellationToken)

Parameters

text string

The text to analyze, already bounded by the caller.

cancellationToken CancellationToken

Cancels the scan.

Returns

Task<IReadOnlyList<SensitiveContentFinding>>

The findings, in no guaranteed order, and empty when the text carries nothing the scanner looks for.

Remarks

Findings point into text by offset and never carry any part of what was found.

Exceptions

ArgumentNullException

Thrown when text is null.

SensitiveContentScannerUnavailableException

Thrown when the scanner could not establish what the text carries.

OperationCanceledException

Thrown when cancellationToken is cancelled.