PlanTempusApp/Core/Configurations/SmartConfigProvider/SmartConfigOptions.cs

28 lines
No EOL
862 B
C#

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;
}
}