Example #1
0
        public DBConfigurationProvider(DBConfigOptions options)
        {
            this.options = options;
            TimeSpan interval = TimeSpan.FromSeconds(3);

            if (options.ReloadInterval != null)
            {
                interval = options.ReloadInterval.Value;
            }
            if (options.ReloadOnChange)
            {
                ThreadPool.QueueUserWorkItem(obj => {
                    while (!isDisposed)
                    {
                        Load();
                        Thread.Sleep(interval);
                    }
                });
            }
        }
 public DBConfigurationSource(DBConfigOptions options)
 {
     this.options = options;
 }