Method AddSensitiveContentCatalogs
- Namespace
- MailFathom.Infrastructure
- Assembly
- MailFathom.Infrastructure.dll
AddSensitiveContentCatalogs(IServiceCollection)
Registers what every scanner declares it can find, whichever scanners this deployment switched on.
public static IServiceCollection AddSensitiveContentCatalogs(this IServiceCollection services)
Parameters
servicesIServiceCollectionThe service collection.
Returns
- IServiceCollection
The service collection, for chaining.
Remarks
A catalog is a declaration rather than a detector: it registers no scanner, compiles no expression, and opens no
client. What it does read is the corpus behind the declaration, whenever one is constructed — and one is
constructed on every start, because the host validates the declarations under ValidateOnStart. So the
unconditional registration is not free of that reading; what it is free of is a
detector nothing would use. What reads a catalog selects by the switches — a plan is composed only for a scanner
that is on — so registering all of them changes nothing about what a deployment scans.
Unconditional because of what depends on the answer, which is the rule rather than the scanning: startup refuses a scanner switched on with nothing behind it, and a configuration write is judged by that same rule against the catalogs this process holds. Registering them with their scanners would make that rule read the switches the process started with, so on a deployment that scans nothing every candidate turning a scanner on would be refused as having no detector — a sentence false about the candidate, and a setting no write could ever change.
Exceptions
- ArgumentNullException
Thrown when
servicesis null.