Method GuardAllAsync
- Namespace
- MailFathom.Application.SensitiveContent.Egress
- Assembly
- MailFathom.Application.dll
GuardAllAsync(SensitiveContentEgressPoint, IReadOnlyList<string>, CancellationToken)
Guards every text of one publication about to cross out of this deployment.
public Task<IReadOnlyList<string>> GuardAllAsync(SensitiveContentEgressPoint egressPoint, IReadOnlyList<string> texts, CancellationToken cancellationToken)
Parameters
egressPointSensitiveContentEgressPointWhere the texts are going.
textsIReadOnlyList<string>The texts to guard, in the order they are published.
cancellationTokenCancellationTokenCancels the scan.
Returns
- Task<IReadOnlyList<string>>
The guarded texts, in the same order and the same number.
Remarks
Each text is scanned on its own rather than joined into one pass, because a joined scan would let a detection straddle the join and redact across two publications that have nothing to do with each other. The concurrency bound the redactor holds is what keeps a wide publication from opening a connection per text.
Exceptions
- ArgumentNullException
Thrown when
textsis null.- SensitiveContentScannerUnavailableException
Thrown when a switched-on scanner could not establish what one of them carries, which refuses the whole egress.
- OperationCanceledException
Thrown when
cancellationTokenis cancelled.