Table of Contents

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

egressPoint SensitiveContentEgressPoint

Where the text is going.

text string

The text to guard, which must be a value rather than a document composed around one.

cancellationToken CancellationToken

Cancels the scan.

Returns

Task<string>

The text with every detected region replaced, or the text itself where nothing is scanned.

Exceptions

ArgumentNullException

Thrown when text is null.

SensitiveContentScannerUnavailableException

Thrown when a switched-on scanner could not establish what the text carries, which refuses the egress.

OperationCanceledException

Thrown when cancellationToken is cancelled.