namespace KubernetesWorkflow { public class StartupConfig { private readonly List configs = new List(); public void Add(object config) { configs.Add(config); } public T Get() { var match = configs.Single(c => c.GetType() == typeof(T)); return (T)match; } } }