public DockerSecretConfigurationProvider(FileConfigurationSource source, string?configKey = default)
     : base(source)
 {
     _configKey = Guard.Argument(configKey)
                  .ValidConfigKey()
                  .Value;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance with the specified source.
 /// </summary>
 /// <param name="source">The source settings.</param>
 public FileConfigurationProvider(FileConfigurationSource source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
     Source = source;
 }
        /// <summary>
        /// Initializes a new instance with the specified source.
        /// </summary>
        /// <param name="source">The source settings.</param>
        public FileConfigurationProvider(FileConfigurationSource source)
        {
            Source = source ?? throw new ArgumentNullException(nameof(source));

            if (Source.ReloadOnChange && Source.FileProvider != null)
            {
                _changeTokenRegistration = ChangeToken.OnChange(
                    () => Source.FileProvider.Watch(Source.Path),
                    () =>
                {
                    Thread.Sleep(Source.ReloadDelay);
                    Load(reload: true);
                });
            }
        }
Beispiel #4
0
        public FileConfigurationProvider(FileConfigurationSource source)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            Source = source;

            if (Source.ReloadOnChange && Source.FileProvider != null)
            {
                ChangeToken.OnChange(
                    () => Source.FileProvider.Watch(Source.Path),
                    () => Load());
            }
        }
Beispiel #5
0
        /// <summary>
        /// Initializes a new instance with the specified source.
        /// </summary>
        /// <param name="source">The source settings.</param>
        public FileConfigurationProvider(FileConfigurationSource source)
        {
            ThrowHelper.ThrowIfNull(source);

            Source = source;

            if (Source.ReloadOnChange && Source.FileProvider != null)
            {
                _changeTokenRegistration = ChangeToken.OnChange(
                    () => Source.FileProvider.Watch(Source.Path !),
                    () =>
                {
                    Thread.Sleep(Source.ReloadDelay);
                    Load(reload: true);
                });
            }
        }
Beispiel #6
0
        /// <summary>
        /// Initializes a new instance with the specified source.
        /// </summary>
        /// <param name="source">The source settings.</param>
        public FileConfigurationProvider(FileConfigurationSource source)
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }
            Source = source;

            if (Source.ReloadOnChange && Source.FileProvider != null)
            {
                ChangeToken.OnChange(
                    () => Source.FileProvider.Watch(Source.Path),//Bookmarks crucial code on detect configuration file changes
                    () => {
                    Thread.Sleep(Source.ReloadDelay);
                    Load(reload: true);
                });
            }
        }
Beispiel #7
0
 public AppConfigConfigurationProvider(FileConfigurationSource source) : base(source)
 {
 }
 /// <summary>
 /// Initializes a new instance with the specified source.
 /// </summary>
 /// <param name="source">The source settings.</param>
 public FileConfigurationProvider(FileConfigurationSource source !!)
 {