()
| 14 | static Dictionary<string, string> _data; |
| 15 | |
| 16 | static Config() |
| 17 | { |
| 18 | Utils.EnsureDirectoryExists(PluginsDir); |
| 19 | Utils.EnsureFileExists(ConfigPath); |
| 20 | Utils.EnsureFileExists(DataStorePath); |
| 21 | |
| 22 | _data = new Dictionary<string, string>(); |
| 23 | |
| 24 | if (File.Exists(ConfigPath)) |
| 25 | { |
| 26 | var lines = File.ReadAllLines(ConfigPath); |
| 27 | |
| 28 | foreach (string line in lines) |
| 29 | { |
| 30 | var parts = line.Split(new[] { '=' }, 2); |
| 31 | |
| 32 | if (parts.Length == 2) |
| 33 | { |
| 34 | string key = parts[0].Trim(); |
| 35 | string value = parts[1].Trim(); |
| 36 | |
| 37 | _data[key] = value; |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | static void Save() |
| 44 | { |
nothing calls this directly
no test coverage detected