Table of Contents

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

egressPoint SensitiveContentEgressPoint

Where the texts are going.

texts IReadOnlyList<string>

The texts to guard, in the order they are published.

cancellationToken CancellationToken

Cancels 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 texts is null.

SensitiveContentScannerUnavailableException

Thrown when a switched-on scanner could not establish what one of them carries, which refuses the whole egress.

OperationCanceledException

Thrown when cancellationToken is cancelled.