/// <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(); }
/// <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); }