Пример #1
0
        public static void UpdateConfiguration(string websiteName = null)
        {
            var stringConfig = new StringConfiguration()
            {
                DefaultWebsiteName = websiteName ?? Load().DefaultWebsiteName,
            };

            stringConfig.SaveJson();
        }
Пример #2
0
        // END

        public static void EnsureExists()
        {
            if (!System.IO.File.Exists(File))
            {
                string path = Path.GetDirectoryName(File);
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }

                var stringConfig = new StringConfiguration();
                stringConfig.SaveJson();

                new LogMessage(LogSeverity.Info, "Guild Configuration", FileName + " created.").PrintToConsole();
            }

            new LogMessage(LogSeverity.Info, "Guild Configuration", FileName + " loaded.").PrintToConsole();
        }