Example #1
0
        /// <summary>
        /// 读取知乎的配置
        /// </summary>
        public static ZhihuWebConfig <ZhihuReceiver> ReadSettingForZhihu()
        {
            ATLog.Info("读取知乎的配置");
            ZhihuWebConfig <ZhihuReceiver> config = new ZhihuWebConfig <ZhihuReceiver>();

            string settingContent = File.ReadAllText(zhihuConfPath);
            Configure <ZhihuReceiver> zhihuConfigure = Newtonsoft.Json.JsonConvert.DeserializeObject <Configure <ZhihuReceiver> >(settingContent);

            config.Convert(zhihuConfigure);

            return(config);
        }