示例#1
0
 public Config()
 {
     if (File.Exists(GetConfigPath()))
     {
         Storage = Core.Config.Storage.Root.FromJson(File.ReadAllText(GetConfigPath()));
     }
     else
     {
         LoadDefaultConfigFile();
         Storage = Core.Config.Storage.Root.FromJson(File.ReadAllText(GetConfigPath()));
     }
 }
示例#2
0
文件: Config.cs 项目: bitobrian/Aiva
        public Config()
        {
            var path = Path.Combine(AppContext.BaseDirectory, "Config", "config.json");

            if (File.Exists(path))
            {
                Storage = Core.Config.Storage.Root.FromJson(File.ReadAllText(path));
            }
            else
            {
                LoadDefaultConfigFile(path);
                Storage = Core.Config.Storage.Root.FromJson(File.ReadAllText(path));
            }
        }