using Tommy; namespace RestySqlite { public class Utils { public static dynamic ReadConfig(string key, string? category = null) { using(StreamReader reader = File.OpenText("conf.toml")) { TomlTable table = TOML.Parse(reader); if (category != null) { return table[category][key]; } return table[key]; } } } }