/// <inheritdoc />
        /// <summary>
        /// Initializes a new instance with the specified source.
        /// </summary>
        /// <param name="source">The <see cref="IConfigurationSource"/> used to retrieve values from AWS Systems Manager Parameter Store</param>
        /// <param name="systemsManagerProcessor">The <see cref="ISystemsManagerProcessor"/> used to retrieve values from AWS Systems Manager Parameter Store</param>
        public SystemsManagerConfigurationProvider(SystemsManagerConfigurationSource source, ISystemsManagerProcessor systemsManagerProcessor)
        {
            Source = source ?? throw new ArgumentNullException(nameof(source));
            SystemsManagerProcessor = systemsManagerProcessor ?? throw new ArgumentNullException(nameof(systemsManagerProcessor));

            if (source.AwsOptions == null)
            {
                throw new ArgumentNullException(nameof(source.AwsOptions));
            }
            if (source.Path == null)
            {
                throw new ArgumentNullException(nameof(source.Path));
            }

            if (source.ReloadAfter != null)
            {
                ChangeToken.OnChange(() =>
                {
                    var cancellationTokenSource = new CancellationTokenSource(source.ReloadAfter.Value);
                    var cancellationChangeToken = new CancellationChangeToken(cancellationTokenSource.Token);
                    return(cancellationChangeToken);
                }, async() =>
                {
                    ReloadTaskEvent.Reset();
                    try
                    {
                        await LoadAsync(true).ConfigureAwait(false);
                    }
                    finally
                    {
                        ReloadTaskEvent.Set();
                    }
                });
            }
        }
 /// <inheritdoc />
 /// <summary>
 /// Initializes a new instance with the specified source.
 /// </summary>
 /// <param name="source">The <see cref="IConfigurationSource"/> used to retrieve values from AWS Systems Manager Parameter Store</param>
 public SystemsManagerConfigurationProvider(SystemsManagerConfigurationSource source) : this(source, new SystemsManagerProcessor(source))
 {
 }