예제 #1
0
        public static void WriteSection(string section)
        {
            SETTINGS js = JsonConvert.DeserializeObject <SETTINGS>(File.ReadAllText($@"settings.json"));
            SETTINGS se = new SETTINGS
            {
                git          = js.git,
                api          = js.api,
                minimumValue = js.minimumValue,
                verbose      = js.verbose,
                ssf          = js.ssf,
                section      = section
            };
            var raw = JsonConvert.SerializeObject(se, Formatting.Indented);

            File.WriteAllText($@"settings.json", raw);
        }
예제 #2
0
        public static string GetSection()
        {
            SETTINGS j = JsonConvert.DeserializeObject <SETTINGS>(File.ReadAllText("settings.json"));

            return(j.section);
        }
예제 #3
0
        public static bool GetSSF()
        {
            SETTINGS j = JsonConvert.DeserializeObject <SETTINGS>(File.ReadAllText("settings.json"));

            return(j.ssf);
        }
예제 #4
0
        public static int GetMinimumValue()
        {
            SETTINGS j = JsonConvert.DeserializeObject <SETTINGS>(File.ReadAllText("settings.json"));

            return(j.minimumValue);
        }