using ZB.MOM.WW.Secrets.Abstractions; namespace ZB.MOM.WW.OtOpcUa.Driver.Galaxy; /// /// A null-object that resolves every name to null /// (absent). Used as the default for the internal test ctor and the parse-only /// CreateInstance path so callers that never exercise a secret: API-key /// ref need not thread a real resolver. A production GalaxyDriver always receives /// the DI-registered resolver via the factory; a secret: ref resolved against this /// null object throws fail-closed (the secret is reported absent), which is the correct /// behaviour for a mis-wired deployment. /// internal sealed class NullSecretResolver : ISecretResolver { /// The shared singleton instance. public static readonly NullSecretResolver Instance = new(); private NullSecretResolver() { } /// public Task GetAsync(SecretName name, CancellationToken ct) => Task.FromResult(null); }