PlanTempusApp/Core/Configurations/SmartConfigProvider/SmartConfigOptions.cs

28 lines
862 B
C#
Raw Normal View History

2025-02-11 23:10:43 +01:00
namespace Core.Configurations.SmartConfig
{
public class SmartConfigOptions
{
private SmartConfiguration.IConfigurationRepository _repository;
internal string _configKey;
public SmartConfigOptions UsePostgres(string configKey)
{
_configKey = configKey;
_repository = new Configurations.SmartConfigProvider.Repositories.PostgresConfigurationRepository();
return this;
}
public SmartConfigOptions UseSqlServer()
{
throw new NotImplementedException();
}
public SmartConfigOptions UseRepository(SmartConfiguration.IConfigurationRepository repository)
{
_repository = repository;
return this;
}
internal SmartConfiguration.IConfigurationRepository GetRepository() => _repository;
}
}