예제 #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));
 }
예제 #2
0
 public static void Load(string path)
 {
     AppConsole.WriteLine("Loading configuration from file: " + path);
     Shared = JsonConvert.DeserializeObject <ApplicationConfig>(File.ReadAllText(path));
 }