StartupConfig.cs
1 namespace KubernetesWorkflow 2 { 3 public class StartupConfig 4 { 5 private readonly List<object> configs = new List<object>(); 6 7 public string? NameOverride { get; set; } 8 9 public void Add(object config) 10 { 11 configs.Add(config); 12 } 13 14 public T Get<T>() 15 { 16 var match = configs.Single(c => typeof(T).IsAssignableFrom(c.GetType())); 17 return (T)match; 18 } 19 } 20 }