コード例 #1
0
        /// <summary>
        /// Creates a new instance of the Configuration provider.
        /// </summary>
        private Provider()
        {
            Cache = new CacheConfiguration();
            Search = new SearchConfiguration();

            Cache.StateChanged += Cache_StateChanged;
            Search.StateChanged += Search_StateChanged;

            LoadConf();
        }
コード例 #2
0
 /// <summary>
 /// Loads the configuration from disk.
 /// </summary>
 private void LoadConf()
 {
     // Works even when the file does not exist !
     Cache = Tools.Serializer.Deserialize<CacheConfiguration>(CacheConfPath);
     Search = Tools.Serializer.Deserialize<SearchConfiguration>(SearchConfPath);
 }