(string? keySuffix = null)
| 57 | private static ConfigFile Config => _config ??= new ConfigFile(); |
| 58 | |
| 59 | public static string GetToken(string? keySuffix = null) |
| 60 | { |
| 61 | var key = GetKey(keySuffix); |
| 62 | if(!Config.HasSectionKey(Section, key)) |
| 63 | { |
| 64 | Config.Load(Path); |
| 65 | } |
| 66 | return Config.GetValue(Section, key, "").As<string>(); |
| 67 | } |
| 68 | public static bool TryGetToken(out string result) => TryGetToken(null, out result); |
| 69 | public static bool TryGetToken(string? keySuffix, out string result) { |
| 70 | result = GetToken(keySuffix); |