Table of Contents

Method AddSecretResolution

Namespace
MailFathom.Infrastructure
Assembly
MailFathom.Infrastructure.dll

AddSecretResolution(IServiceCollection, SecretValueInterpretation)

Registers the secret reference grammar, the shipped scheme adapters, and the composite dispatch.

public static IServiceCollection AddSecretResolution(this IServiceCollection services, SecretValueInterpretation interpretation)

Parameters

services IServiceCollection

The service collection.

interpretation SecretValueInterpretation

How configured secret-bearing values are interpreted.

Returns

IServiceCollection

The service collection, for chaining.

Remarks

A provider for a managed store registers its own ISecretSchemeResolver through its own extension beside this call and needs no edit here, because the composite dispatches over whatever adapters it is handed.

The mode is checked here rather than trusted, because a numeric configuration value binds to an undefined member without complaint. The composite compares against the two inline modes explicitly, so an undefined value would fall through and behave like the strictest mode — the safe outcome, but reached by accident and reported in the startup log as a mode nobody selected. A configuration mistake has to fail rather than be absorbed.

Exceptions

ArgumentNullException

Thrown when services is null.

ArgumentOutOfRangeException

Thrown when interpretation is not a defined member.