예제 #1
0
파일: Bing.cs 프로젝트: wangchlxt/FirstTest
 public void LoadConfig()
 {
     if (File.Exists(ConfigFile))
     {
         Config = SerializationUtil.DeserializationBinary <BingConfig>(ConfigFile);
     }
     else
     {
         Config = new BingConfig();
         SaveConfig();
     }
 }
예제 #2
0
        /// <summary>
        /// 静态构造函数
        /// </summary>
        static ConfigManager()
        {
            _initConfig = new BingConfig();

            _initConfig.Logger.EnabledDebug = true;
            _initConfig.Logger.EnabledTrace = true;
            _initConfig.Logger.Level        = "DEBUG";
            _initConfig.Logger.Type         = "File";
            _initConfig.Logger.ProjectName  = "JCE";

            _initConfig.UserContext.EnabledUserName = false;
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="bingConfig">Bing config information</param>
 public BingSearchRespository(IOptions <BingConfig> bingConfig)
 {
     _bingConfig = bingConfig.Value;
 }
예제 #4
0
 public BingSearchEngineRepository(IOptions <BingConfig> bingConfig)
 {
     _bingConfig = bingConfig.Value;
 }