Beispiel #1
0
 public static void Save(ApplicationConfig cfg, string path)
 {
     AppConsole.WriteLine("Saving configuration to file: " + path);
     File.WriteAllText(path, JsonConvert.SerializeObject(cfg, Formatting.Indented));
 }
Beispiel #2
0
 public static void Load(string path)
 {
     AppConsole.WriteLine("Loading configuration from file: " + path);
     Shared = JsonConvert.DeserializeObject <ApplicationConfig>(File.ReadAllText(path));
 }