cs-codex-dist-tests/Framework/KubernetesWorkflow/StartupConfig.cs

21 lines
453 B
C#

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