예제 #1
0
        private static List <RegisterInfo> GetConfigFromFile()
        {
            var cfgPath = HttpContext.Current.Server.MapPath("~/App_Data\\RegisterInfo.json");

            if (!File.Exists(cfgPath))
            {
                throw new FileNotFoundException("配置文件不存在或文件路径错误!", cfgPath);
            }

            return(JsonEx.FromJson <List <RegisterInfo> >(File.ReadAllText(cfgPath)));
        }