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
servicesIServiceCollectionThe service collection.
interpretationSecretValueInterpretationHow 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
servicesis null.- ArgumentOutOfRangeException
Thrown when
interpretationis not a defined member.