protected BaseConfigurationProvider(WebHostBuilderContext context, TConfiguration configuration, IParser <string> parser, ISettingsRepository repository)
        {
            _context      = context ?? throw new ArgumentNullException(nameof(context));
            Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
            _parser       = parser ?? throw new ArgumentNullException(nameof(parser));

            if (repository == null)
            {
                throw new ArgumentNullException(nameof(repository));
            }

            if (string.IsNullOrWhiteSpace(configuration.ConnectionString))
            {
                throw new ArgumentNullException(nameof(configuration), "Connectionstring is missing from configuration");
            }

            if (string.IsNullOrWhiteSpace(configuration.Database))
            {
                throw new ArgumentNullException(nameof(configuration), "Database is missing from configuration");
            }

            _client = repository.CreateClient(configuration.ConnectionString);
        }