Method TryParse
- Namespace
- MailFathom.Infrastructure.Secrets
- Assembly
- MailFathom.Infrastructure.dll
TryParse(string?, out SecretLifetime)
Reads a configured lifetime.
public static bool TryParse(string? configuredValue, out SecretLifetime lifetime)
Parameters
configuredValuestringThe bound value: NoLimitValue or an ISO 8601 instant carrying an explicit offset.
lifetimeSecretLifetimeThe parsed lifetime when the value is well formed; otherwise NoLimit.
Returns
Remarks
An instant without an explicit offset is refused rather than read in the host's local time, because the same configuration would then expire at a different moment on every machine that ran it. Absence and an empty value are refused too: the setting has a default, and a blank one is a mistake rather than a way of spelling it.