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
textstringThe text to analyze, already bounded by the caller.
cancellationTokenCancellationTokenCancels 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
textis null.- SensitiveContentScannerUnavailableException
Thrown when the scanner could not establish what the text carries.
- OperationCanceledException
Thrown when
cancellationTokenis cancelled.