예제 #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));
            }
        }