public void Setup() { _sqlExecutor = SetupSqlQueryExecutor(); _dataService = new DataServiceImplementation(_sqlExecutor); _loader = new UserSettingsLoader(_dataService); _saver = new UserSettingsSaver(_dataService); var settings = new UserSettings(_loader, _saver); _configurationService = new ConfigurationService(settings); }
/// <summary> /// The recommended behaviour is to provide a loader or a saver in case we want /// to save the settings to database. /// </summary> /// <param name="loader"></param> /// <param name="saver"></param> public UserSettings(IUserSettingsLoader loader, IUserSettingsSaver saver) { _settingsLoader = loader; _settingsSaver = saver; }