public ConfigurationService(IConfigurationFactory configurationFactory, IConfigurationUpgradeManager upgradeManager) { _configurationFactory = configurationFactory ?? throw new ArgumentNullException(nameof(configurationFactory)); _upgradeManager = upgradeManager ?? throw new ArgumentNullException(nameof(upgradeManager)); _configurationFileNamePrefix = "config"; _configurationFolderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Assembly.GetEntryAssembly().GetName().Name); }
public ConfigurationService(IConfigurationFactory configurationFactory, IConfigurationUpgradeManager upgradeManager, string configurationFileNamePrefix, string configurationFolderPath) { _configurationFactory = configurationFactory ?? throw new ArgumentNullException(nameof(configurationFactory)); _upgradeManager = upgradeManager ?? throw new ArgumentNullException(nameof(upgradeManager)); if (String.IsNullOrEmpty(configurationFileNamePrefix)) { throw new ArgumentNullException(nameof(configurationFileNamePrefix)); } _configurationFileNamePrefix = configurationFileNamePrefix; if (String.IsNullOrEmpty(configurationFolderPath)) { throw new ArgumentNullException(nameof(configurationFolderPath)); } _configurationFolderPath = configurationFolderPath; }