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

            return((string)cacheSetting.GetValue(name));
        }
        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);
        }
Exemple #3
0
 public static T GetValue <T>(string path)
 {
     return(JsonConfig.GetValue <T>("..\\..\\..\\settings.json", path));
 }