Table of Contents

Method AddSecretContentScanning

Namespace
MailFathom.Infrastructure
Assembly
MailFathom.Infrastructure.dll

AddSecretContentScanning(IServiceCollection)

Registers the in-process detector of credentials in mail text.

public static IServiceCollection AddSecretContentScanning(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection.

Returns

IServiceCollection

The service collection, for chaining.

Remarks

Called by every deployment, because this detector runs in this process and needs nothing deployed beside it, so any user may switch it on for their own mail whatever the deployment's own switch says. Registering it constructs nothing: the corpus is compiled when the first posture that runs this scanner resolves it, and a deployment nobody asked for scanning on resolves none. What the scanner declares it can find is registered by AddSensitiveContentCatalogs(IServiceCollection) separately, for the reason stated there.

The scanner is a singleton, because the corpus is compiled once and the scanner holds it.

Exceptions

ArgumentNullException

Thrown when services is null.