Method GuardAsync
- Namespace
- MailFathom.Application.SensitiveContent.Derivation
- Assembly
- MailFathom.Application.dll
GuardAsync(string, CancellationToken)
Redacts one text about to be written into a derived store.
public Task<string> GuardAsync(string text, CancellationToken cancellationToken)
Parameters
textstringThe text to redact, which must be a value rather than a document composed around one.
cancellationTokenCancellationTokenCancels the scan.
Returns
- Task<string>
The text with every detected region replaced, or the text itself where nothing is scanned.
Exceptions
- ArgumentNullException
Thrown when
textis null.- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what the text carries, which refuses the derived write.
- OperationCanceledException
Thrown when
cancellationTokenis cancelled.