Method GuardWithOmissionAsync
- Namespace
- MailFathom.Application.SensitiveContent.Egress
- Assembly
- MailFathom.Application.dll
GuardWithOmissionAsync(SensitiveContentEgressPoint, string, CancellationToken)
Guards one text and reports what the analyzed ceiling kept out of it.
public Task<GuardedText> GuardWithOmissionAsync(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<GuardedText>
The guarded text and how many characters lay beyond what one scan analyzes.
Remarks
For the consumer that publishes how complete what it hands over is. The ceiling is the one bound in this feature that never raises a failure — text beyond it is dropped rather than passed on unscanned — so a consumer that could not see the drop would report a message as whole that a scan had ended early.
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.