Interface IDatabaseConnectionSettingsValidator
- Namespace
- MailFathom.Infrastructure.Persistence.Connections
- Assembly
- MailFathom.Infrastructure.dll
Proves that reloaded database connection settings can be used before they are published.
public interface IDatabaseConnectionSettingsValidator
Remarks
Resolving the references in a candidate is not enough on its own. The material behind
Persistence:ConnectionString is a connection string, so it has to parse and — when it is what supplies the
credential — still carry one; material that resolves but does not parse would pass a reference check, replace the
last known good settings, and then fail every connection opened afterwards, which is the outcome the reload
contract exists to prevent.
The contract lives in Infrastructure because only the adapter that composed the data source knows which
setting currently supplies the credential, and the host that publishes snapshots must not have to model the
provider's connection string to find out.
Methods
- FindConfigurationFailuresAsync(PostgresConnectionSettings, CancellationToken)
Finds everything that stops a reloaded candidate from being adopted.