Table of Contents

Method GuardAsync

Namespace
MailFathom.Application.SensitiveContent.Derivation
Assembly
MailFathom.Application.dll

GuardAsync(MailAccountId, string, CancellationToken)

Redacts one text about to be written into a derived store.

public Task<string> GuardAsync(MailAccountId account, string text, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account whose mail the text was extracted from.

text string

The text to redact, 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 scans this account's mail.

Exceptions

ArgumentNullException

Thrown when text is null.

SensitiveContentScannerUnavailableException

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

OperationCanceledException

Thrown when cancellationToken is cancelled.