namespace KubernetesWorkflow { public class StartupConfig { private readonly List configs = new List(); public string? NameOverride { get; set; } public bool CreateCrashWatcher { get; set; } public void Add(object config) { configs.Add(config); } public T Get() { var match = configs.Single(c => typeof(T).IsAssignableFrom(c.GetType())); return (T)match; } } }