private void InitDataAdapter() { string configPath = ReturnConfigPath(); var drive = new DriveInfo(_driverLetter); if (drive.IsReady) { if (!Directory.Exists(configPath)) { Directory.CreateDirectory(configPath); } DataAdapter = new JsonFileDataAdapter(configPath); } else { DataAdapter = new EmptyDataAdapter(); } }
public FileSystemWithPathContextHandler(string path) { DataAdapter = new JsonFileDataAdapter(path); }
public FileSystemContextHandler() { DataAdapter = new JsonFileDataAdapter(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); }