private void SetUpWatcher(int refreshInterval, ConfigurationChangedEventHandler changed)
 {
     this.configWatcher =
         new ConfigurationChangeFileWatcher(
             GetFullFileName(this.configurationFilepath, this.ConfigSource),
             this.ConfigSource);
     this.configWatcher.SetPollDelayInMilliseconds(refreshInterval);
     this.configWatcher.ConfigurationChanged += changed;
 }
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.configWatcher != null)
         {
             this.configWatcher.Dispose();
             this.configWatcher = null;
         }
     }
 }