public CacheService() { _pathFolderCache = AppSettings.GetFolderCachePath(); if (!File.Exists(_pathFolderCache + "\\" + SUSPECT_FILENAME)) { File.Create(_pathFolderCache + "\\" + SUSPECT_FILENAME); } if (!File.Exists(_pathFolderCache + "\\" + SUSPECT_BANNED_FILENAME)) { File.Create(_pathFolderCache + "\\" + SUSPECT_BANNED_FILENAME); } if (!File.Exists(_pathFolderCache + "\\" + SUSPECT_WHITELIST_FILENAME)) { File.Create(_pathFolderCache + "\\" + SUSPECT_WHITELIST_FILENAME); } if (!File.Exists(_pathFolderCache + Path.DirectorySeparatorChar + RANKS_FILENAME)) { File.Create(_pathFolderCache + Path.DirectorySeparatorChar + RANKS_FILENAME); } string demoBasicDataFilePath = GetDemoBasicFilePath(); if (!File.Exists(demoBasicDataFilePath)) { File.Create(demoBasicDataFilePath); } Filter = new DemoFilter(); #if DEBUG _settingsJson.Formatting = Formatting.Indented; #endif _settingsJson.ReferenceLoopHandling = ReferenceLoopHandling.Serialize; _settingsJson.PreserveReferencesHandling = PreserveReferencesHandling.All; _settingsJson.NullValueHandling = NullValueHandling.Include; }
public CacheService() { _pathFolderCache = AppSettings.GetFolderCachePath(); foreach (string fileName in _requiredFiles) { string filePath = GetFilePath(fileName); if (!File.Exists(filePath)) { File.Create(filePath); } } Filter = new DemoFilter(); #if DEBUG _settingsJson.Formatting = Formatting.Indented; #endif _settingsJson.ReferenceLoopHandling = ReferenceLoopHandling.Serialize; _settingsJson.PreserveReferencesHandling = PreserveReferencesHandling.All; _settingsJson.NullValueHandling = NullValueHandling.Include; }