Esempio n. 1
0
        private static string GetSetting(string name)
        {
            if (cacheSetting == null)
            {
                cacheSetting = new JsonConfig("~/Scripts/fileman/conf.json");
            }

            return((string)cacheSetting.GetValue(name));
        }
Esempio n. 2
0
        private static string LangRes(string name)
        {
            if (cacheLang == null)
            {
                cacheLang = new JsonConfig("~/Scripts/fileman/lang/vi.json");
            }

            string ret = (string)cacheLang.GetValue(name);

            if (ret.IsNullEmpty())
            {
                return(name);
            }
            return(ret);
        }
Esempio n. 3
0
 public static T GetValue <T>(string path)
 {
     return(JsonConfig.GetValue <T>("..\\..\\..\\settings.json", path));
 }