Method GuardAsync
- Namespace
- MailFathom.Application.SensitiveContent.Egress
- Assembly
- MailFathom.Application.dll
GuardAsync(SensitiveContentEgressPoint, string, CancellationToken)
Guards one text about to cross out of this deployment.
public Task<string> GuardAsync(SensitiveContentEgressPoint egressPoint, string text, CancellationToken cancellationToken)
Parameters
egressPointSensitiveContentEgressPointWhere the text is going.
textstringThe text to guard, 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 egress.
- OperationCanceledException
Thrown when
cancellationTokenis cancelled.